From: Piers Cawley [mailto:[EMAIL PROTECTED]]
> Garrett Goebel <[EMAIL PROTECTED]> writes:
> >
> > And what's to prevent that collection object from handling: 
> >
> >     my $queue = SomeQueue.new;
> >  
> >     $queue.push('foo');
> >     $queue.push('bar');
> >     $queue.push('baz');
> >  
> >     my $index_of_foo = $queue['foo']; # undef if no foo in queue.
> 
> Because I also want to be able to access 
> 
>    $nth_foo = $queue[$n]
> 
> Which I thought was so blindingly obvious as not to need stating.

Never underestimate blindingly obvious when I'm involved ;)

$idx_of_foo = $queue['foo']; # named lookup
$nth_foo    = $queue[600];   # ordered lookup

One is SvPOK the other SvIOK...

Can't we handle both and still have the ordered lookup be fast?

--
Garrett Goebel
IS Development Specialist

ScriptPro                   Direct: 913.403.5261
5828 Reeds Road               Main: 913.384.1008
Mission, KS 66202              Fax: 913.384.2180
www.scriptpro.com          [EMAIL PROTECTED]

Reply via email to