Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While you can't replace all macros with blocks, I think there's an interesting argument in there about doing some things done with macros using blocks, and that it has the advantage that a function accepting a block can be passed around in ways a macro can't be.


If we talk about blocks, do we mean something different than a LAMBDA, e.g. a closure?


No. Smalltalk called these blocks, and Ruby does too.

BTW a lambda expression and a closure are not the same thing. A lambda expression evaluates to a closure, just as an expression like "(make-instance 'foo)" (or "new Foo()" for non-Lispers) evaluates to an instance. The former, in each case, is a syntactic entity, something you can write in your program; the latter is an object inside the machine.


A: Presenting macros!

B: Look what you can do with not-macros.

A: Great.

;)


Nonsensical.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: