Hacker News new | ask | show | jobs
by draegtun 5719 days ago
Io (http://www.iolanguage.com) is a bit of an exception then.

Its homoiconic but its not a Lisp. And it doesn't have macros yet its code is fully inspectable/modifiable at runtime in an very easy & elegant way.

For eg. if you wanted to have a line like this:

    list(1, 2, 3) each foo bar
which needs to be transformed into below at runtime:

    list(1, 2, 3) foreach(foo bar)
Then this can be done like so:

    List each := method(
	m := call message
	m setName("foreach") setArguments(list(m attached)) setAttached(nil)
	self doMessage(m)
    )
ref: http://www.iolanguage.com/blog/blog.cgi?do=item&id=86
1 comments

Does it have lazy evaluation?
Yes. The List each above is acting lazily.

Here is a better example of how it works: http://news.ycombinator.com/item?id=1627777