HaloO,

Brandon S. Allbery KF8NH wrote:
On 2008 Sep 6, at 13:57, Larry Wall wrote:
But basically I think NIL is a mild form of failure anyway, so it's
fine with me if () is a form of failure that is smart enough to be

I'm thinking () is the non-scalar (list, array, capture, maybe hash) version of undef, which acts like a value unless you have warnings turned on; and undef is managed as a kind of unthrown exception already, thus so should ().

I would strongly object to both of these statements on the footing that
~() eq '' and +() == 0 are the images of the neutral element of List in
two homomorphisms mapping the List type to Str and Int respectively. And
I believe we agree that neither '' nor 0 are forms of undef, right? Note
that there is no monoid of objects because there is no generic binary
operation on objects that corresponds to tilde, comma or plus.

To me undef means "outside of type" but () is definitely a list. It is
producing undef when indexed just as (1,2,3)[3] does where no one argues
that (1,2,3) is an undefined list of length 4 or some such.


Regards, TSa.
--

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Reply via email to