Re: Keyed access to PerlArray/PerlHash

2002-08-13 Thread Dan Sugalski
On Tue, 13 Aug 2002, Tom Hughes wrote: > In message > 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)

Re: Keyed access to PerlArray/PerlHash

2002-08-13 Thread Tom Hughes
In message 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

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 > 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

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 > 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 th

Re: Keyed access to PerlArray/PerlHash

2002-08-13 Thread Tom Hughes
In message 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 acce

Re: Keyed access to PerlArray/PerlHash

2002-08-13 Thread Tom Hughes
In message 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 get

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 Perl