4 ms·
Couldn't you add something equivalent to Lisp macros to languages like Perl or Python? Yes, see Io: http://iolanguage.com/ http://iolanguage.com/ http://www.
by richcollins 15y ago
Couldn't you add something equivalent to Lisp macros to languages like Perl or Python?
Yes, see Io:
http://iolanguage.com/ http://iolanguage.com/
http://www.reddit.com/r/programming/comments/64mgk/why_io_has_a_very_clean_mirror_on_the_io/ http://www.reddit.com/r/programming/comments/64mgk/why_io_ha...
http://web.archive.org/web/20090427182332/http://hackety.org/2008/01/05/ioHasAVeryCleanMirror.html http://web.archive.org/web/20090427182332/http://hackety.org...
- phaedrus 15y agoI was about to say the same thing. Since Io represents the program as an expression tree of messages, you can write macros to operate on the message tree, and they work for Io's syntax as easily as Lisp macros work for Lisp syntax.
- anatoly 15y agoAlso see metalua.
- thisrod 15y agoAlso see Smalltalk, for contrast. Lisp's uniform syntax lets the interpreter rewrite parts of programs; Smalltalk's uniform semantics let programs rewrite parts of the interpreter. PG's discussion of objects overlooks that. OMeta looks like a combination of the two. It sounds really interesting, but I suspect it's for people smarter than me.
- draegtun 15y agoDitto for Ioke & Perl6. Some previous HN posts: http://news.ycombinator.com/item?id=2144067 http://news.ycombinator.com/item?id=2144067 & http://news.ycombinator.com/item?id=2157961 http://news.ycombinator.com/item?id=2157961