in reply to (ichi) 2.times('Re: ') Apocalypse 5 and regexes
in thread Apocalypse 5 and regexes
There is not a single reason why
%hash[key]? is less acceptable than %hash{key} in Perl6
You're perfectly correct. There's not a single reason; there are (at least) five:
- We're trying to retain at least some backwards compatibility in the syntax for variable accesses,
- Not distinguishing statically between hash and array look-ups severely limits opportunities for fundamental optimizations,
- Not distinguishing statically between hash and array look-ups reduces our ability to do compile-time error detection,
- Even without error checking, programmers are much less likely to make mistakes if there is three characters' difference between a hash look-up and an array look-up, rather than just a single sigil (that's why we inflect both noun and verb when making plurals in English),
- Unless we distinguish hash and array look-ups, there's no way to create objects that can be used as both, according to need (e.g. we can't fix caller to allow named return elements, and we can't allow regexes to simultaneously return their numbered captures as an array and their named captures as a hash.
|
---|
Replies are listed 'Best First'. | |
---|---|
(ichi) Re x 4: Apocalypse 5 and regexes
by ichimunki (Priest) on Jun 07, 2002 at 15:31 UTC | |
by TheDamian (Vicar) on Jun 08, 2002 at 23:10 UTC | |
by stefp (Vicar) on Jun 09, 2002 at 02:59 UTC | |
by Anonymous Monk on Jun 09, 2002 at 05:49 UTC | |
by ichimunki (Priest) on Jun 10, 2002 at 16:54 UTC | |
by demerphq (Chancellor) on Jun 14, 2002 at 11:22 UTC |
In Section
Meditations