On Wednesday 23 October 2002 17:58, Luke Palmer wrote: > > From: Adriano Nagelschmidt Rodrigues <[EMAIL PROTECTED]> >> [...] > > Do you think that Lisp macros make the language more powerful than > > others (eg Perl)? I mean, do they really give a competitive > > advantage, or are they being overrated (see below)? > > If you define "powerful" as "can do more things," then of course not.
We're probably not talking about Turing-completeness here, so I'm not sure your point is valid. You sure can 'do more thing' in a language with Lisp-style macros (read _On Lisp_ and blow your mind). As for the competitive advantage etc., this does have a lot to see with the programmer. As for OOP or patterns or whatever, there is no silver bullet. > Lisp is implemented in C, and C's macros are certainly not essential > to its functionality. Humph. What does the fact that Lisp *can be* implemented in C have to see with C macros? BTW, it would be an insult to Lisp to compare C's macros to Lisp's macros. C macros are a stupid text replacement facility, they don't have anything to see with Lisp-style macros. > But think of what macros in general provide: > > * Multi-platform compatability > * Easier maintenance That's for C macros. It doesn't make much sense if you are talking about Lisp macros. > However, they are intending to make it possible to write things like > C<if> with subs, which will imply most of the power of > macros... Well, if it means controling evaluation and making arbitrary code manipulation, then yes, probably... > though I imagine it won't be possible to have the level of > introspection lisp macros have (infinite). ? Manipulating arbitrary AST in Perl would be very complicated, those 'pesky' parenthesis in Lisp account for a lot of the magic that can go on while keeping things at a reasonable amount of complexity. Guillaume