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 => (stringifyi... Russ Allbery
- Re: RFC 84 (v1) Replace => (stringifying c... Uri Guttman
- Re: RFC 84 (v1) Replace => (stringifying comma) wit... Dan Sugalski
- Re: RFC 84 (v1) Replace => (stringifying comma) wit... 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) Repl... iain truskett
- Re: RFC 84 (v1) Replace => (stringifying comma... Dan Sugalski
- Re: RFC 84 (v1) Replace => (stringifying c... Jonathan Scott Duff
- Re: RFC 84 (v1) Replace => (stringifyi... Chaim Frenkel
- Re: RFC 84 (v1) Replace => (string... John Porter
- Re: RFC 84 (v1) Replace => (stringifying c... John Porter
- Re: RFC 84 (v1) Replace => (stringifying comma) wit... John Porter
- Re: RFC 84 (v1) Replace => (stringifying comma... Jonathan Scott Duff
- Re: RFC 84 (v1) Replace => (stringifying comma) wit... John Porter
- Re: RFC 84 (v1) Replace => (stringifying comma) wit... John Porter
- Re: RFC 84 (v1) Replace => (stringifying comma) wit... Kai Henningsen
- Re: RFC 84 (v1) Replace => (stringifying comma... Dan Sugalski
- Re: RFC 84 (v1) Replace => (stringifying c... Nathan Torkington
- Re: RFC 84 (v1) Replace => (stringifyi... Karl Glazebrook
- Re: RFC 84 (v1) Replace => (stringifying comma... Chaim Frenkel