On Monday, March 15, 2004, at 11:05 , Larry Wall wrote:
On Mon, Mar 15, 2004 at 07:54:09PM -0700, Luke Palmer wrote:
Larry Wall writes:
And basically because I decided :foo('bar') is too ugly for something
that will get used as often as switches are on the unix command line.
The %hash syntax
{ $?foo{'baz'} ... $?baz } .../
> > : > or
> > : > if / ... ... { $?foo«baz» ... $?baz } .../
> > :
> > : I'm probably a bit behind on current thinking, but did %hash{bareword}
> > : lose the ability to assume the bareword is a constant str
?baz } .../
> : > or
> : > if / ... ... { $?foo«baz» ... $?baz } .../
> :
> : I'm probably a bit behind on current thinking, but did %hash{bareword}
> : lose the ability to assume the bareword is a constant string?
>
> It's thinking hard about doing that.
ing hard about doing that. :-)
>
> : And why «»? Last I heard that was the unicode version of qw(), which
> : returns an array. Using an array constructor as a hash subscriptor is
> : not a "least surprise" to me.
>
> We'd be trading that surprise for the surprise that %hash
bably a bit behind on current thinking, but did %hash{bareword}
: > : lose the ability to assume the bareword is a constant string?
: >
: > It's thinking hard about doing that. :-)
: >
: > : And why «»? Last I heard that was the unicode version of qw(), which
: > : returns
ty to assume the bareword is a constant string?
>
> It's thinking hard about doing that. :-)
>
> : And why ÂÂ? Last I heard that was the unicode version of qw(), which
> : returns an array. Using an array constructor as a hash subscriptor is
> : not a "least surprise&
doing that. :-)
: And why «»? Last I heard that was the unicode version of qw(), which
: returns an array. Using an array constructor as a hash subscriptor is
: not a "least surprise" to me.
We'd be trading that surprise for the surprise that %hash{shift} doesn't
call C.
f / ... ... { $?foo«baz» ... $?baz } .../
I'm probably a bit behind on current thinking, but did %hash{bareword}
lose the ability to assume the bareword is a constant string?
And why «»? Last I heard, that was the unicode version of qw(), which
returns an array. Using an array construc