in reply to Comparing undefined values

I don't think it's an optimization. eq requires strings, so its operands get stringified. What would you have be the string value of undef? I think it's pretty natural to stringify undef to the nul string (with a warning).

Replies are listed 'Best First'.
Re^2: Comparing undefined values
by QM (Parson) on Dec 16, 2005 at 23:27 UTC
    This opens up the whole line of strong typing, comparing/combining like types, casting to like types, and autoconversion of unlike types.

    I've always found it difficult in other languages to determine which type wins in the comparison wars. Where there is more than one kind of numeric type, I have to keep a cheat sheet.

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of