Re: Empty hash

2005-06-09 Thread Michele Dondi
On Thu, 2 Jun 2005, Stuart Cook wrote: On 6/1/05, Luke Palmer [EMAIL PROTECTED] wrote: Should {} be an empty hash rather than an empty code? Given that an empty hashref is probably much more useful than an empty block, I propose that {} be an empty hash and {;} be an empty block. Speaking

Re: Empty hash

2005-06-02 Thread Stuart Cook
On 6/1/05, Luke Palmer [EMAIL PROTECTED] wrote: Should {} be an empty hash rather than an empty code? Given that an empty hashref is probably much more useful than an empty block, I propose that {} be an empty hash and {;} be an empty block. This mirrors the fact that (AFAIK) { $_ = 1

Re: Empty hash

2005-06-02 Thread TSa (Thomas Sandlaß)
Luke Palmer wrote: Should {} be an empty hash rather than an empty code? Does it matter? More interesting is the question what it returns or evaluates to if it's a block. Actually with my idea of List beeing a subtype of Code the parse time recognition of blocks as List of Pair has

Re: Empty hash

2005-06-02 Thread Stuart Cook
On 6/2/05, TSa (Thomas Sandlaß) [EMAIL PROTECTED] wrote: Luke Palmer wrote: Why did we change { %hash } from making a shallow copy of a hash to the code that returns %hash? Sorry, I don't understand this question. Do you want 'shallow copy' to mean 'take a ref'? Or Parrot/Pugs level COW?

Empty hash

2005-06-01 Thread Luke Palmer
Two questions: Should {} be an empty hash rather than an empty code? Why did we change { %hash } from making a shallow copy of a hash to the code that returns %hash? Luke