Jonathan Scott Duff wrote:
> As for $a[$something], if @a had been declared as
> "my @a : assoc;", then perl should stringify $something, otherwise
> numify. Hmm.. I guess this implies that all hashes need to be
> pre-declared. :-(
That was kinda along the lines of my suggestion; that the behavior
of an "array" be defined by a bound implementation. Just like tie,
but without a syntactically supported distinction between arrays
and hashes.
Perhaps
sub ARRAY::assoc::FETCH {
my $self = shift;
# I'm an associative array, so stringize the key:
my $index = "$_[0]";
...
--
John Porter
- Re: RFC 109 (v1) Less line noise - let's ... John Porter
- Re: RFC 109 (v1) Less line noise - let's get ... Damien Neil
- Re: RFC 109 (v1) Less line noise - let's ... Karl Glazebrook
- Re: RFC 109 (v1) Less line noise - le... Damien Neil
- Re: RFC 109 (v1) Less line noise... Casey R. Tweten
- Re: RFC 109 (v1) Less line noise... Karl Glazebrook
- Re: RFC 109 (v1) Less line n... Damien Neil
- Re: RFC 109 (v1) Less line noise - let's ... John Porter
- Re: RFC 109 (v1) Less line noise - le... Damien Neil
- Re: RFC 109 (v1) Less line noise... Jonathan Scott Duff
- Re: RFC 109 (v1) Less line n... John Porter
- Re: RFC 109 (v1) Less line noise... John Porter
- Re: RFC 109 (v1) Less line noise - let's get rid of @% Jon Ericson
- Re: RFC 109 (v1) Less line noise - let's get rid ... John Porter
- Re: RFC 109 (v1) Less line noise - let's get ... Dan Sugalski
- Re: RFC 109 (v1) Less line noise - let's ... John Porter
- Re: RFC 109 (v1) Less line noise - le... John Porter
- Re: RFC 109 (v1) Less line noise - let's ... Russ Allbery
- Re: RFC 109 (v1) Less line noise - le... Andy Wardley
- Re: RFC 109 (v1) Less line noise - let's get rid ... Karl Glazebrook
- Re: RFC 109 (v1) Less line noise - let's get ... Bryan C . Warnock
