Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. If it's nullable, then it can't be a boolean.

If it's nullable, then it can't be a boolean.

Scheduled Pinned Locked Moved The Lounge
question
33 Posts 23 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L leppie

    CPallini wrote:

    Three-state[^].

    Cool kids say: Tri-state :)

    ((λ (x) `(,x ',x)) '(λ (x) `(,x ',x)))

    D Offline
    D Offline
    Dalek Dave
    wrote on last edited by
    #8

    Cool Italian Kids say Trieste

    ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

    C 1 Reply Last reply
    0
    • R Rhys Gravell

      Henry Minute wrote:

      so why call it a nullable bool

      No such beast exists, nor shall it ever, (well as long as we're talking C#). It's an instance of the generic nullable struct with an underlying boolean value type. Obviously this doesn't roll of the tongue so well however, maybe nullable representative boolean?

      Rhys "I'd rather die on my feet than live on my knees"

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #9

      goblinTech wrote:

      No such beast exists,

      That may well be true, but I have seen many such references.

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

      R 1 Reply Last reply
      0
      • D Dalek Dave

        Cool Italian Kids say Trieste

        ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #10

        Cool Italian Kids say Roma. :cool:

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        1 Reply Last reply
        0
        • H Henry Minute

          I'm sure that a subject of such import must have been discussed here before, but if so, I missed it. If it can have more than two values it cannot really be a boolean value, so why call it a nullable bool? Anyone got a better name? I can only come up with truelean or trilean.

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

          N Offline
          N Offline
          Nemanja Trifunovic
          wrote on last edited by
          #11

          Henry Minute wrote:

          I can only come up with truelean or trilean.

          Almost. There is Boost.Tribool[^] library. An example of use:

          tribool a (true);
          tribool b (false);
          tribool c (indeterminate);

          if (indeterminate (a) && !b) do_something();

          utf8-cpp

          1 Reply Last reply
          0
          • H Henry Minute

            goblinTech wrote:

            No such beast exists,

            That may well be true, but I have seen many such references.

            Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

            R Offline
            R Offline
            Rhys Gravell
            wrote on last edited by
            #12

            Yeah, I know. The terminology used in describing nullable types and the misuderstanding it leads to is a bit of a pet hate, as you may well guess from my reply :-)

            Rhys "I'd rather die on my feet than live on my knees"

            1 Reply Last reply
            0
            • H Henry Minute

              I'm sure that a subject of such import must have been discussed here before, but if so, I missed it. If it can have more than two values it cannot really be a boolean value, so why call it a nullable bool? Anyone got a better name? I can only come up with truelean or trilean.

              Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

              R Offline
              R Offline
              RugbyLeague
              wrote on last edited by
              #13

              Buddhist bool

              B 1 Reply Last reply
              0
              • H Henry Minute

                I'm sure that a subject of such import must have been discussed here before, but if so, I missed it. If it can have more than two values it cannot really be a boolean value, so why call it a nullable bool? Anyone got a better name? I can only come up with truelean or trilean.

                Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                R Offline
                R Offline
                Richard A Dalton
                wrote on last edited by
                #14

                Henry Minute wrote:

                so why call it a nullable bool?
                 
                Anyone got a better name?

                A Boolean Nullable would be technically more accurate. -Richard

                Hit any user to continue.

                1 Reply Last reply
                0
                • H Henry Minute

                  I'm sure that a subject of such import must have been discussed here before, but if so, I missed it. If it can have more than two values it cannot really be a boolean value, so why call it a nullable bool? Anyone got a better name? I can only come up with truelean or trilean.

                  Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                  R Offline
                  R Offline
                  R Giskard Reventlov
                  wrote on last edited by
                  #15

                  Surely it should be called 'noolean'?

                  "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

                  1 Reply Last reply
                  0
                  • H Henry Minute

                    I'm sure that a subject of such import must have been discussed here before, but if so, I missed it. If it can have more than two values it cannot really be a boolean value, so why call it a nullable bool? Anyone got a better name? I can only come up with truelean or trilean.

                    Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                    K Offline
                    K Offline
                    Keith Barrow
                    wrote on last edited by
                    #16

                    Closest I can come up with is ternary. There is Balanced Ternary[^], but the "don't care" value is 0 (-1 false, +1 true) though null might better describe a don't "care state" ?

                    Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                    -Or-
                    A Dead ringer for Kate Winslett[^]

                    D 1 Reply Last reply
                    0
                    • K Keith Barrow

                      Closest I can come up with is ternary. There is Balanced Ternary[^], but the "don't care" value is 0 (-1 false, +1 true) though null might better describe a don't "care state" ?

                      Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                      -Or-
                      A Dead ringer for Kate Winslett[^]

                      D Offline
                      D Offline
                      Dalek Dave
                      wrote on last edited by
                      #17

                      How about a 'Meh'?

                      ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                      C K 2 Replies Last reply
                      0
                      • H Henry Minute

                        I'm sure that a subject of such import must have been discussed here before, but if so, I missed it. If it can have more than two values it cannot really be a boolean value, so why call it a nullable bool? Anyone got a better name? I can only come up with truelean or trilean.

                        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #18

                        Don't come with that. It reminds me too much of a database where some (censored word) declared boolean columns as varchar(1) and used the letter 'X' as true and null as false. And of course his application failed when there was anything else than 'X' or null in those columns. No doubt that he also would have created a similar chaos if he had known that you can have nullable value types.

                        "Dark the dark side is. Very dark..." - Yoda ---
                        "Shut up, Yoda, and just make yourself another toast." - Obi Wan Kenobi

                        1 Reply Last reply
                        0
                        • D Dalek Dave

                          How about a 'Meh'?

                          ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                          C Offline
                          C Offline
                          Colin Mullikin
                          wrote on last edited by
                          #19

                          How about a 'Bacon'? Seems as good a choice as any.

                          1 Reply Last reply
                          0
                          • H Henry Minute

                            I'm sure that a subject of such import must have been discussed here before, but if so, I missed it. If it can have more than two values it cannot really be a boolean value, so why call it a nullable bool? Anyone got a better name? I can only come up with truelean or trilean.

                            Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                            C Offline
                            C Offline
                            clientSurfer
                            wrote on last edited by
                            #20

                            I like bullean

                            1 Reply Last reply
                            0
                            • H Henry Minute

                              I'm sure that a subject of such import must have been discussed here before, but if so, I missed it. If it can have more than two values it cannot really be a boolean value, so why call it a nullable bool? Anyone got a better name? I can only come up with truelean or trilean.

                              Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                              J Offline
                              J Offline
                              Joan M
                              wrote on last edited by
                              #21

                              In Spanish a "trilero" is a guy who use three cards or pots to hide a small ball to cheat tourists in crowded streets... so avoid that name... if you don't avoid it one of your variables could go to jail... :rolleyes:

                              [www.tamelectromecanica.com] Robots, CNC and PLC machines for grinding and polishing.

                              H 1 Reply Last reply
                              0
                              • H Henry Minute

                                I'm sure that a subject of such import must have been discussed here before, but if so, I missed it. If it can have more than two values it cannot really be a boolean value, so why call it a nullable bool? Anyone got a better name? I can only come up with truelean or trilean.

                                Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                                Q Offline
                                Q Offline
                                QuiJohn
                                wrote on last edited by
                                #22

                                It's tri-curious.

                                And sometimes when you're on, you're really f***ing on And your friends they sing along and they love you But the lows are so extreme that the good seems f***ing cheap And it teases you for weeks in its absence Rilo Kiley - "A Better Son/Daughter"

                                G 1 Reply Last reply
                                0
                                • J Joan M

                                  In Spanish a "trilero" is a guy who use three cards or pots to hide a small ball to cheat tourists in crowded streets... so avoid that name... if you don't avoid it one of your variables could go to jail... :rolleyes:

                                  [www.tamelectromecanica.com] Robots, CNC and PLC machines for grinding and polishing.

                                  H Offline
                                  H Offline
                                  Henry Minute
                                  wrote on last edited by
                                  #23

                                  Joan Murt wrote:

                                  In Spanish a "trilero" is a guy who use three cards or pots to hide a small ball

                                  In America I believe they use one cup but two girls.

                                  Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                                  D J D 3 Replies Last reply
                                  0
                                  • H Henry Minute

                                    Joan Murt wrote:

                                    In Spanish a "trilero" is a guy who use three cards or pots to hide a small ball

                                    In America I believe they use one cup but two girls.

                                    Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                                    D Offline
                                    D Offline
                                    Dalek Dave
                                    wrote on last edited by
                                    #24

                                    If ever anything could be unseen, that would be it.

                                    ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                                    1 Reply Last reply
                                    0
                                    • H Henry Minute

                                      Joan Murt wrote:

                                      In Spanish a "trilero" is a guy who use three cards or pots to hide a small ball

                                      In America I believe they use one cup but two girls.

                                      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                                      J Offline
                                      J Offline
                                      Joan M
                                      wrote on last edited by
                                      #25

                                      X| :rolleyes:

                                      [www.tamelectromecanica.com] Robots, CNC and PLC machines for grinding and polishing.

                                      1 Reply Last reply
                                      0
                                      • H Henry Minute

                                        Joan Murt wrote:

                                        In Spanish a "trilero" is a guy who use three cards or pots to hide a small ball

                                        In America I believe they use one cup but two girls.

                                        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                                        D Offline
                                        D Offline
                                        Dan Neely
                                        wrote on last edited by
                                        #26

                                        That's Brazilian filth. X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X|

                                        3x12=36 2x12=24 1x12=12 0x12=18

                                        1 Reply Last reply
                                        0
                                        • H Henry Minute

                                          I'm sure that a subject of such import must have been discussed here before, but if so, I missed it. If it can have more than two values it cannot really be a boolean value, so why call it a nullable bool? Anyone got a better name? I can only come up with truelean or trilean.

                                          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                                          R Offline
                                          R Offline
                                          Rob Grainger
                                          wrote on last edited by
                                          #27

                                          In "The Relational Model of Database Management v2" (a tome and a half), Codd introduces 4-valued logic, Yes, No, Maybe but Applicable, Maybe and Inapplicable. The distinction between the latter affects how aggregates apply (you can Count Applicable (or A-Marks), but not Inapplicable (I-Marks)). Unfortunately, by Codd's definitions, there are No RDBMS in existence. (There are many other improvements there, we would probably have no need for ORM's among other things). Doesn't answer your question of course ;-)

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups