![]() |
|
|
|
|
|
|
6
5th October 21:22
External User
Posts: 1
|
Well, it is a gray area, so just because perl can do some tricks does
not mean it has effectively the same power as Lisp. But I do not know perl so I may not be much help in deciding. I never use Lisp eval, fwiw. "can be done"? By you or a preprocessor. Are you talking about something akin to the C preprocessor? That is certainly useful (I beat on the C preprocessor like I was its daddy back in my day) but not what we are talking about. How do you know? Do you know how to write good hairy Lisp macros? If not, you might want to retract the above. The key to Lisp code=data is not eval, it is that code is /represented/ just like a form of Lisp data (the list, including nested lists) which has two huge consequences for macros: they can take apart their code bodies with all of Lisp's power to dissect lists, and they can generate code trivially just by producing other lists. Of code. For another language to offer Lisp macros, the macro keyword would have to pre-parse the Java or COBOL or Python source and present it to the macro function as a terribly convenient data structure for that language, and be prepared to accept same once transformed by the macro function and produce sensible run-time code therefrom. There then still is a new burden of understanding the transformation from native syntax to convenient representation, but as long as they use lists it won't be too hard. ![]() ken -- Cells: http://common-lisp.net/project/cells/ "I'll say I'm losing my grip, and it feels terrific." -- Smiling husband to scowling wife, New Yorker cartoon |
|