Chaim Frenkel wrote:
>
> In a hash exists() is a valid concept. In an array (even a sparse one)
> exists() has no meaning. The data is always there. The sparsity is
> an implementational detail.
WADR, exists() could -- even if it doesn't currently -- have a defined
meaning for arrays:
my @arr :low(10) :high(1000);
exists $arr[100000] # false, of course.
or even
my @arr = ( 0 .. 100 );
exists $arr[100000] # false, if exists() is defined this way.
> A hash has symbols, names, things. An array has just numbers[*].
"Things"? A hash is indexed by strings, an array is indexed by numbers.
They *both* have values distinct from (pointed to by) their indices.
Again, sounds to me like the difference between strings and numbers.
And to reiterate an earlier point: if @foo is declared to be an
associative array rather than a normal, numerically indexed array,
there's no need to support a distinct indexing syntax:
my @foo :assoc;
$foo['finger'] = 'plan';
--
John Porter
Aus tiefem Traum bin ich erwacht.
- Re: RFC 84 (v1) Replace => (stringifying comma... Dan Sugalski
- Re: RFC 84 (v1) Replace => (stringifying comma... John Porter
- Re: RFC 84 (v1) Replace => (stringifying comma... Dan Sugalski
- Re: RFC 84 (v1) Replace => (stringifying comma... John Porter
- Devils advocacy (Re: RFC 84 (v1) Replace => (s... Nathan Torkington
- Re: Devils advocacy (Re: RFC 84 (v1) Replace =>... John Porter
- Re: Devils advocacy (Re: RFC 84 (v1) Replace =>... iain truskett
- Re: RFC 84 (v1) Replace => (stringifying comma... Dan Sugalski
- Re: RFC 84 (v1) Replace => (stringifying comma... Jonathan Scott Duff
- Re: RFC 84 (v1) Replace => (stringifying comma... Chaim Frenkel
- Re: RFC 84 (v1) Replace => (stringifying comma... John Porter
- Re: RFC 84 (v1) Replace => (stringifying comma... John Porter
- Re: RFC 84 (v1) Replace => (stringifying comma... Kai Henningsen
- Re: RFC 84 (v1) Replace => (stringifying comma... Dan Sugalski
- Re: RFC 84 (v1) Replace => (stringifying comma... Nathan Torkington
- Re: RFC 84 (v1) Replace => (stringifying comma... Karl Glazebrook
- Re: RFC 84 (v1) Replace => (stringifying comma... Chaim Frenkel
- Hashes vs arrays (was Re: RFC 84 (v1) Replace =&g... Jeremy Howard
- Re: RFC 84 (v1) Replace => (stringifying comma) wit... Nathan Torkington
- Re: RFC 84 (v1) Replace => (stringifying comma... John Porter
- Re: RFC 84 (v1) Replace => (stringifying comma... Jonathan Scott Duff
