In his P6 Summary for 2002-07-14, in section
"Perl 6 grammar, take 5", Piers says:
someone pointed out that [the grammar] had a problem
with code like
{ some_function_returning_a_hash() }
Should it give a closure? Or a hash ref?
Larry hasn't commented so far.
I couldn't find where anyone said any such thing,
but regardless, it's still a good question.
I believe it should give a hash ref, for two (related)
reasons:
a. it is the more common case. Better Huffman coding.
b. there is a word to make it a closure explicitly
which the programmer can add if that's what she
wants. No such word (AFAIK) does the same for
a hash ref.
And if this is something that has already been hashed out,
never mind. :-)
--
JohnDouglasPorter
I am intrinsically no good
I have a heart that's made of wood
__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com