From: matz@... (Yukihiro Matsumoto) Date: 2004-08-03T12:00:32+09:00 Subject: Re: Macros in Ruby Hi, In message "Re: Macros in Ruby" on 04/08/03, James Britt writes: |Would true macros in Ruby be more prone to abuse than they are in Lisp? * Lisp does not have syntax. They only have meta syntax (i.e. S-expression), Lisp macro do not change its (meta) syntax to rely on (I'm ignoring reader macro here). In comparison, Ruby does have syntax but no meta syntax, so that you can easily loose syntax to rely on by macros in Ruby. You will feel like a stranger when you see Ruby programs with a lot of macros. I don't think you feel same way when you see Lisp programs with macros. * macro system more than simplest one (e.g. C preprocessor macro) is VERY difficult to design and implement for languages with usual syntax. If you are curious, see Dylan's macro. * about 50% of macro usage in Lisp (extending syntax a bit) can accomplish using blocks in Ruby. we don't need inlining functions when we have other rooms for optimization, for example, C extensions. * I admit disclosing abstract syntax tree to Ruby programs can open new possibilities. it's good for users at the moment, I guess. but it is very bad in a long run unless I design it perfectly. I'm sure I will change my mind in AST design and alas, here comes another big field of incompatibility. matz.