Re: Grammar ambiguities again (was: Perl 6 Summary for week ending

2002-07-15 Thread Deborah Ariel Pickett
Sorry, I was being too terse in my original message, I guess some of the meaning got lost. When I said: > > If %(...) makes a shallow copy of its innards, as Perl5's { ... } does, > > then how do you impose hash context onto something without doing the > > copy? What I meant to say was: > > Spea

Re: Grammar ambiguities again (was: Perl 6 Summary for week ending

2002-07-15 Thread Ashley Winters
On Tuesday 16 July 2002 01:01 am, Deborah Ariel Pickett wrote: > If %(...) makes a shallow copy of its innards, as Perl5's { ... } does, > then how do you impose hash context onto something without doing the > copy? %{} forces hash context. What else could it do? %{ foo() } calls foo() in hash c

Re: Grammar ambiguities again (was: Perl 6 Summary for week ending

2002-07-15 Thread Deborah Ariel Pickett
> > Using %(...) to create a hashref, as { ... } does in Perl5, would go > > against all that, because the purpose of making a hashref is to > > *reference* something. Now a unary % operator/sigil/prefix might mean > > referencing, or it might mean dereferencing, depending on whether the > > symb

Re: Grammar ambiguities again (was: Perl 6 Summary for week ending

2002-07-15 Thread Luke Palmer
On Tue, 16 Jul 2002, Deborah Ariel Pickett wrote: > > I still have my vote on %() as a hash constructor in addition to {}. :) > > The problem I see with that is that % as a prefix implies a > *dereferencing*, though years of Perl5 conditioning like this: > %{ $mumble } = return_a_hash(); > p

Re: Grammar ambiguities again (was: Perl 6 Summary for week ending

2002-07-15 Thread Deborah Ariel Pickett
> I still have my vote on %() as a hash constructor in addition to {}. :) The problem I see with that is that % as a prefix implies a *dereferencing*, though years of Perl5 conditioning like this: %{ $mumble } = return_a_hash(); print_hash( %{ $mumble } ); (Yes, the braces are optional; I'm

RE: Grammar ambiguities again (was: Perl 6 Summary for week ending 20020714)

2002-07-15 Thread Brent Dax
David Whipp: # Brent Dax wrote: # > $href = hash { %hash }; #B # # Why the curlies? if C is a function (ctor), then surely # these should be parentheses. In this context, parentheses are # optional, so this could be written # #$href = hash %hash; C is not a function. It's a keyword

RE: Grammar ambiguities again (was: Perl 6 Summary for week ending 20020714)

2002-07-15 Thread David Whipp
Brent Dax wrote: > $href = hash { %hash }; #B Why the curlies? if C is a function (ctor), then surely these should be parentheses. In this context, parentheses are optional, so this could be written $href = hash %hash; Dave.

Re: Grammar ambiguities again (was: Perl 6 Summary for week ending 20020714)

2002-07-15 Thread Ashley Winters
On Monday 15 July 2002 11:22 pm, Deborah Ariel Pickett wrote: > Besides, does > $hashref = some_function_returning_a_hash() > make $hashref simply refer to the result of the function, or does it > make $hashref refer to a hash containing a *copy* of the result of the > function? If Perl6 is

RE: Grammar ambiguities again (was: Perl 6 Summary for week ending 20020714)

2002-07-15 Thread Brent Dax
Deborah Ariel Pickett: # > > ..., and someone pointed out that it had a problem # > > with code like "{ some_function_returning_a_hash() # }". Should it give a # > > closure? Or a hash ref? ... # > Oh, well now that it's stated this way... (something went # wrong in my # > brain wh

Grammar ambiguities again (was: Perl 6 Summary for week ending 20020714)

2002-07-15 Thread Deborah Ariel Pickett
Back to this again . . > > ..., and someone pointed out that it had a problem > > with code like "{ some_function_returning_a_hash() }". Should it give a > > closure? Or a hash ref? ... > Oh, well now that it's stated this way... (something went wrong in my > brain when I read the