From: Michael Lucas-Smith Date: 2002-01-19T21:00:01+09:00 Subject: Re: Proc.class vs yield TheSchof wrote: > That's a slippery slope to smalltalk ;-). I suppose you could if you were > required to give an empty arglist like [|| ...] when there weren't any > arguments so there would be no confusion with an Array literal. But if you > were going to change the language why not only allow one of the two currently > allowed syntaxes for a block ({|| ...}, or do || ... end), and use the other to > instantiate an actual Proc object (and I'm not necessarily advocating this, but > it might add more visual distinction). The best I can offer you is a band-aid, > lambda instead of proc (a much nicer word don't you think?). > writing lambda instead of proc makes it two characters uglier :) Yes.. much cooler word, very Lisp. But still not the solution I'm looking for. I think the real problem happened when {} was reused for another job other than hash for the anonymous block. I have another novel idea,.. instead of [] or {} .. what about "" ? .. or '' ? Michael > Alexander Schofield > > Michael Lucas-Smith wrote: > >>I see what you're saying. I suggest that perhaps it was a mistake to >>re-use the same syntax between hash and block. Obviously that cannot be >>fixed now, but perhaps [] can be used to represent a proc so that: >> >>proc { ... } >>and: >>[ ... ] >> >>mean the same thing. >> >>Michael >>