From: Wesley J Landaker Date: 2003-11-20T15:02:46+09:00 Subject: Re: "stereotyping" thread --Boundary-02=_DkFv/zVOHWsCwhV Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Description: signed data Content-Disposition: inline On Wednesday 19 November 2003 10:33 pm, Hal Fulton wrote: > David A. Black wrote: > > Hi -- > > > > On Thu, 20 Nov 2003, Wesley J Landaker wrote: > >>Why not just use empty modules for all this type-checking? This > >> isn't > > > > Because class/module ancestry doesn't tell you about type. See the > > previous 120 messages or so :-) > > Ehh, I swore I'd stay out of this. But here I am. Yeah, maybe I should have stayed out of it too. ;) > I think what Wesley is talking about is different. He's proposing (or > not really proposing, since he's only asking "Why don't the people > who want this do that?") -- as I understand it -- creating modules > whose sole purpose is to identify the high-level properties of an > object. That's right, Hal; I read through the previous 120 messages or so, and=20 thought "I really don't want that, but for the people who do, and say=20 they want features x, y, and z, why don't they just do this?".=20 Bah, well, let's just pretend I didn't say anything. ;) > And someone will say, "Yes, but I could mix in that module even if > the object didn't have those properties." > > And someone else will say, "Yes, but that would be a BUG." > > And the never-ending thread goes on. (Completely off-topic, but more interesting to me): Sometime I'll have to post about my C++ preprocessor that lets you embed=20 ruby in C++. Unlike other implementations I've seen, it's two-way --=20 you can put variables in, and get them back out. ;)=20 #include #include #include using std::string; using std::cout; #include int main() { int x =3D 9; int y =3D 12; string s =3D "fooxar"; printf("My favorite words are %s.\n", inline_ruby { %{s}.sub('x','b') + " and " + "bar" }); int z =3D inline_ruby { %{x} + %{y} }; inline_ruby { %{s} =3D "Hello, World!\n" } cout << s; Ruby::Value v =3D inline_ruby { Object.new } inline_ruby { p %{v} } } Ah, I need to package that up for release, it's lots of fun. =3D) > "The thread goes ever, ever on, > Down from the post where it began...." "This is the thread that never ends! ... Yes it goes on and on my friends! ..." =2D-=20 Wesley J. Landaker - wjl@icecavern.net OpenPGP FP: 4135 2A3B 4726 ACC5 9094 0097 F0A9 8A4C 4CD6 E3D2 --Boundary-02=_DkFv/zVOHWsCwhV Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/vFkD8KmKTEzW49IRApXVAJ0eIXa3Ebfei4WnnY7GYJr6Z6TjDwCfXEot 2ugl4FMR47286sTCRE67fmU= =E07/ -----END PGP SIGNATURE----- --Boundary-02=_DkFv/zVOHWsCwhV--