From: Gavin Sinclair Date: 2004-08-05T00:01:09+09:00 Subject: Re: Macros in Ruby On Wednesday, August 4, 2004, 10:41:43 PM, Jesse wrote: >> Jesse Jones wrote: >> >>Your statement implies that Ruby blocks are >> >>equivalent to LISP closures, which is untrue. >> > >> > As far as I can tell Lisp lambda functions (ie closures) do everything >> > that Ruby blocks and proc objects do but with cleaner semantics and >> > fewer artifical distinctions. Lisp lambda functions *do* do everything that Ruby blocks do. But doing is not the same as being. I wrote that they are not equivalent. The difference is syntax. It's an artifical distinction that works tremendously well in practice at expressing the solution in code. >> What are some of the differences? I've been away from lisp for a while.... > Between Ruby and Lisp? To tell the truth I'm not entirely sure. The > pickaxe book does a lousy job explaining the differences between blocks > and proc objects. I'm still not sure why Ruby needs two concepts when > Lisp and other languages get by with one. I also don't know why Ruby > uses that weird yield syntax. On the one hand you advocate macros to make syntax more expressive; on the other you advocate rolling everything back into anonymous functions with no visual distinctions. *shrug* Gavin