[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: exists $foo[7] and delete $foo[7]
Thus it was written in the epistle of Tom Christiansen,
> >>Could you please distinguish
> >>this from "undefined"?
>
> >You can assign an undefined _value_ to something. But there's no concept
> >of assigning an uninitialized _value_, because it is an attribute (or
> >state of being).
>
> >IOW, "uninitialized" is a stronger particular condition than "undefined".
>
> >>Can only the scalar elements in an array
> >>be uninitialized?
>
> This is disconcerting. In Perl lingo, we have always used the terms
> "undefined" and "uninitialized" interchangeably when it came to
> scalar values.
I'd like to second that. Furthermore, this definition of delete violates
least surprise (or is that of import any more?). I would expect
delete($array[2])
to be equivalent to
splice(@array,2,1)
(and, frankly, more natural to read).
Ted
--
Ted Ashton (ashted@southern.edu), Info Serv, Southern Adventist University
==========================================================
The mathematician who pursues his studies without clear views of this
matter, must often have the uncomfortable feeling that his paper and pencil
surpass him in intelligence.
-- Mach, Ernst (1838 - 19166)
- References to:
-
Tom Christiansen <tchrist@chthon.perl.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]