4 ms·
> In that context, the differentiating power of Lisp seems to be around macros - a very powerful way to write programs that write programs. I have done my fair
by flavio81 9y ago
> In that context, the differentiating power of Lisp seems to be around macros - a very powerful way to write programs that write programs. I have done my fair share of meta-programming with Ruby and I realized I really didn't want the power to change my program model at runtime. While they made certain things easier - like Rails's ActiveRecord (which is superb btw) - the "inception"-like indirection made things very hard to reason about.
The difference between metaprogramming in Lisp (lisp macros) and metaprogramming in a language like Ruby, is that writing macros in Lisp is really, really easy.
It is simply not much harder than writing a normal function.
Thus, while in other languages, doing metaprogramming is a special affair, in Lisp it is a piece of cake, and nothing special at all. Lisp also allows you to "expand" the macro to see what the macro would do when called. This is also very easy to do.
So, i do agree with your point, however let me rephrase it:
One of the most important differentiators for Lisp is really easy-to-write metaprogramming.
- jasim 9y agoI'm now curious to give macros a try. Thanks.