Re: Autovivification (was Re: E6: assume nothing)

2003-09-26 Thread Paul Hodges
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Mon, Sep 08, 2003 at 11:18:12AM +0200, Paul Johnson wrote: > : By the way, I trust this will be addressed (if it hasn't been > : already): > : > : perl5 -le 'print "gah!" if exists $a{b}{c}; print "phooey!" > : if exists $a{b}' > : > : perlfunc say

Re: Autovivification (was Re: E6: assume nothing)

2003-09-25 Thread Larry Wall
On Mon, Sep 08, 2003 at 11:18:12AM +0200, Paul Johnson wrote: : By the way, I trust this will be addressed (if it hasn't been already): : : perl5 -le 'print "gah!" if exists $a{b}{c}; print "phooey!" if exists $a{b}' : : perlfunc says: : : This surprising autovivification in what does not at f

Autovivification (was Re: E6: assume nothing)

2003-09-08 Thread Paul Johnson
Jonadab the Unsightly One said: > $s = %h{foo} = nonex; > > After deleting the foo key (and its value, if any) from %h this then > probably procedes to autovivify it when evaluating it as an rvalue; Now why on earth would you want to do that? Perl 5 doesn't. By the way, I trust this will be

Re: E6: assume nothing

2003-09-07 Thread Jonadab the Unsightly One
Luke Palmer <[EMAIL PROTECTED]> writes: > A synonym of: > > delete %h{foo}; > > would be > > %h{foo} = nonex; This has the potential, if not documented exactly right, to create bogus expectations. Consider... $s = %h{foo} = nonex; After deleting the foo key (and its value, if any)

Re: E6: assume nothing

2003-08-01 Thread Luke Palmer
I wrote: > Damian explains: > > Trey asked: > > > > > To take the E6 example of currying &part: > > > > > >&List::Part::part.assuming(labels => <>) > > > > > > One had to curry in C to be the same as it was defined in C<&part> > > > originally, i.e. C<< <> >>. > > > > > > What if one wanted

Re: E6: assume nothing

2003-08-01 Thread Luke Palmer
> Trey asked: > > > To take the E6 example of currying &part: > > > >&List::Part::part.assuming(labels => <>) > > > > One had to curry in C to be the same as it was defined in C<&part> > > originally, i.e. C<< <> >>. > > > > What if one wanted to curry in whatever the default is, i.e., assu

Re: E6: assume nothing

2003-08-01 Thread Damian Conway
Trey asked: To take the E6 example of currying &part: &List::Part::part.assuming(labels => <>) One had to curry in C to be the same as it was defined in C<&part> originally, i.e. C<< <> >>. What if one wanted to curry in whatever the default is, i.e., assuming "nothing" (different from "assum

Re: E6: assume nothing

2003-07-31 Thread Austin Hastings
This is, I believe, an extension of the undef vs. null discussion that went on some time back (we were discussing default values for arrays, types, etc.) The consensus (which I remain in disagreement with) was that undef meant "go get your default" -- in effect, that you couldn't store undef into

Re: E6: assume nothing

2003-07-31 Thread Trey Harris
In a message dated Thu, 31 Jul 2003, Austin Hastings writes: > assuming(labels => undef) Okay... I think you're wrong, because this would have to be a special case (defaults take effect only when *nothing* is passed in, not when the argument is undefined) but, assuming you're right... if I want to

Re: E6: assume nothing

2003-07-31 Thread Austin Hastings
--- Trey Harris <[EMAIL PROTECTED]> wrote: > To take the E6 example of currying &part: > >&List::Part::part.assuming(labels => <>) > > One had to curry in C to be the same as it was defined in > C<&part> > originally, i.e. C<< <> >>. > > What if one wanted to curry in whatever the default i

E6: assume nothing

2003-07-31 Thread Trey Harris
To take the E6 example of currying &part: &List::Part::part.assuming(labels => <>) One had to curry in C to be the same as it was defined in C<&part> originally, i.e. C<< <> >>. What if one wanted to curry in whatever the default is, i.e., assuming "nothing" (different from "assuming nothing"