Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
So, between the ambiguity of Perl's "undef" and the clarity of SQL's NULL...
You take an interesting position there. "Interesting" in that I've previously debated the merits of SQL's NULL with people who hold that it meaning is ambiguous in exactly the same ways that you say undef is ambiguous. (Does NULL mean that the value is unavailable? Unknown? Inapplicable? Something else?)

Personally, I think that both undef and NULL are fine as they are. Even if you split them into a flock of distinct not-a-values, at least one not-a-value will always be a catch-all for cases that fall outside the set of explicit not-a-values, so the ambiguity will always exist. Yes, the use of explicitly-defined not-a-values would reduce the need to use ambiguous not-a-values, but that comes at the cost of complexity in remembering how the various not-a-values interact and deciding which one to use in any given situation. Far better, IMO, to keep the syntax simple with a single not-a-value, relying on the programmer to indicate its meaning in any given situation and determine the appropriate behavior based on that meaning.


In reply to Re: "undef" is not NULL and what to do about it by dsheroh
in thread "undef" is not NULL and what to do about it by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found