From: Edward Faulkner Date: 2005-09-28T02:47:56+09:00 Subject: Re: Fwd: Lisp macros --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 28, 2005 at 12:26:42AM +0900, Robert Klemme wrote: > Maybe I missed something in the discussion but I still wonder what would > be gained by having Lisp macro like capabilities in Ruby (apart from the > fun that it'd certainly be for some of us)? Do we actually gain > something? Is there something that we cannot do in Ruby without this > feature and that will become utterly easy with it? =20 Lisp macros are essentially a technique for metaprogramming. Ruby already has its own metaprogramming techniques. I suspect almost anything you can do with one you can do with the other. But they take very different approaches. Lisp enables metaprogramming by making the full power of the language available at compile time. Ruby enables metaprogramming by eliminating the distinction between compile time and run time. (Note that Lisp can be run interpreted too. Compilation in that case happens just before each evaluation.) Personally, I think the Lisp way is more elegant, and it has more opportunities for optimization. But I think it would be a mistake to try to graft it onto Ruby. It doesn't match with Ruby's style and philosophy. regards,=20 Ed --6TrnltStXW4iwmi0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDOYV/nhUz11p9MSARAvDYAKDOhzwY9wFu+X84g7l3S4G/AhX1IACePZPs hWuMtA0abKc0tYxVegc4jYk= =I87x -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0--