View Single Post

Thread: minor programming rant

  1. - Top - End - #8
    Surgebinder in the Playground Moderator
    Douglas's Avatar

    Join Date
    Aug 2005
    Mountain View, CA

    Default Re: minor programming rant

    Quote Originally Posted by Mastikator View Post
    When I first read this I was like "WHAT??? Since when is null not no value", I set out to find out if you're right and turns out the answer is also null. I got this site and it says like you do "A null represents missing or unknown information at the column level". Always thought null meant "no value", not "unknown/missing"
    "Unknown/missing" is a concept that clearly has many use cases where it needs to be represented in some way, and what other way is there than null? Same with "uninitialized", and of course "no value". This is part of the big problem with null as a concept in programming - there are at least three different concepts it can represent, maybe more I haven't thought of, and few languages have any way to indicate which one of them any particular null is supposed to mean.

    Quote Originally Posted by factotum View Post
    There are already perfectly good ways to represent no value--e.g. 0 for a number or an empty string for a text field. There wouldn't be much point in NULL if it did the same thing.
    Those are terrible ways to represent "no value", because they are in fact actual values too.
    Last edited by Douglas; 2019-09-15 at 01:10 PM.
    Like 4X (aka Civilization-like) gaming? Know programming? Interested in game development? Take a look.

    Avatar by Ceika.

    Saberhagen's Twelve Swords, some homebrew artifacts for 3.5 (please comment)
    Isstinen Tonche for ECL 74 playtesting.
    Team Solars: Powergaming beyond your wildest imagining, without infinite loops or epic. Yes, the DM asked for it.
    Arcane Swordsage: Making it actually work (homebrew)