On Fri, Aug 25, 2006 at 10:17:11PM +0900, Matthew Johnson wrote:
> >. . . except that in Lisps the () is list syntax, and the reason
> >closures and methods share that syntax is that everything is a list.
> >That's my understanding, anyway.  Then again, I'm no Lisp expert.
> >
> >On the other hand, Perl might be a good example of unified syntax for
> >methods and closures.  In both cases, calling the thing involves a
> >dereferencing, for which ->() is the syntax.
> 
> True, I was thinking of invocation and typed () where that doesn't  
> apply to Lisp.  The point was that in some languages invocation is  
> accomplished in the same way since the two forms of definition are  
> semantically equivalent.  If I remember correctly (it has been quite  
> a while since I've looked at Lisp and Scheme) this is actually a  
> difference between Scheme and Lisp.  Scheme has a single namespace  
> for variable definitions and function definitions whereas in Common  
> Lisp the two are separate.  I actually much prefer the Scheme  
> approach and consider it to be more beautiful and simple.  The  
> biggest barrier to something like this in Ruby (at least in 1.8.x) is  
> that the parameters are handled slightly differently for the two (ex.  
> procs cannot take a block).

I wasn't aware of that -- it seems like a pretty severe (if rarely
imposing) limitation.  At first glance, it also looks like a largely
arbitrary limitation, though I'm pretty sure there are at least
implementation issues involved, since last I checked the Ruby community
doesn't seem to suffer from Guidoism (aka: lambdas are one line of code,
period, because I say so, also period).

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
print substr("Just another Perl hacker", 0, -2);