Re: Keyed access to PerlArray/PerlHash

2002-08-13 Thread Tom Hughes
In message a05111b10b97e5445dbfe@[63.120.19.221] Dan Sugalski [EMAIL PROTECTED] wrote: Hash should support integer lookup. PerlHash doesn't have to, and may throw an exception. I don't follow the logic behind this... Making it work for one but not another is tricky - either

Re: Keyed access to PerlArray/PerlHash

2002-08-13 Thread Tom Hughes
In message a05111b10b97e5445dbfe@[63.120.19.221] Dan Sugalski [EMAIL PROTECTED] wrote: Arrays don't have to support lookup by string keys. They also can throw an exception. How about numeric keys? Presumably they can also throw an exception as it doesn't make much sense to access

Re: Keyed access to PerlArray/PerlHash

2002-08-13 Thread Dan Sugalski
At 5:50 PM +0100 8/13/02, Tom Hughes wrote: In message a05111b10b97e5445dbfe@[63.120.19.221] Dan Sugalski [EMAIL PROTECTED] wrote: Arrays don't have to support lookup by string keys. They also can throw an exception. How about numeric keys? Presumably they can also throw an

Re: Keyed access to PerlArray/PerlHash

2002-08-13 Thread Dan Sugalski
At 5:49 PM +0100 8/13/02, Tom Hughes wrote: In message a05111b10b97e5445dbfe@[63.120.19.221] Dan Sugalski [EMAIL PROTECTED] wrote: Hash should support integer lookup. PerlHash doesn't have to, and may throw an exception. I don't follow the logic behind this... Making it work for

Re: Keyed access to PerlArray/PerlHash

2002-08-13 Thread Tom Hughes
In message a05111b06b97eea0ca9c0@[63.120.19.221] Dan Sugalski [EMAIL PROTECTED] wrote: Nobody's doing a get_integer on key PMCs--we're peeking directly. (Integer lookup can also be done via the keyed_int method of the vtable) At the moment it is using get_integer as I decided to

Re: Keyed access to PerlArray/PerlHash

2002-08-13 Thread Dan Sugalski
On Tue, 13 Aug 2002, Tom Hughes wrote: In message a05111b06b97eea0ca9c0@[63.120.19.221] Dan Sugalski [EMAIL PROTECTED] wrote: Nobody's doing a get_integer on key PMCs--we're peeking directly. (Integer lookup can also be done via the keyed_int method of the vtable) At the

Keyed access to PerlArray/PerlHash

2002-08-12 Thread Tom Hughes
Is indexing a PerlHash by an integer something that is supposed to be valid? Likewise for indexing a PerlArray by a string? Currently both of these are allowed, but as it stands my keyed access patch breaks this. Obviously indexing either by a PerlScalar will still work as the PerlScalar PMC

Re: Keyed access to PerlArray/PerlHash

2002-08-12 Thread Dan Sugalski
At 7:51 PM +0100 8/12/02, Tom Hughes wrote: Is indexing a PerlHash by an integer something that is supposed to be valid? Likewise for indexing a PerlArray by a string? Currently both of these are allowed, but as it stands my keyed access patch breaks this. Obviously indexing either by a