Why does this trigger boomers so much?

Why does this trigger boomers so much? I can immediately tell good and bad programmers apart by how they use null in their code.

Mike Stoklasa's Worst Fan Shirt $21.68

UFOs Are A Psyop Shirt $21.68

Mike Stoklasa's Worst Fan Shirt $21.68

  1. 1 month ago
    Anonymous

    It's literally nothing.

    • 1 month ago
      Anonymous

      heh

    • 1 month ago
      Anonymous

      this is the case until you try to access it.

      • 1 month ago
        Anonymous

        when you try to access it, it's still nothing

  2. 1 month ago
    Anonymous

    wasn't C invented by boomers? are you moronic or something?

    • 1 month ago
      Anonymous

      >wasn't C invented by boomers?
      Ritchie would have been 80 by now.

      • 1 month ago
        Anonymous

        >would have
        I forget sometimes that dmr kicked it recently.
        NULL fricking sucks to have pepper in your code because there will always be a fricking time that sometime fails to allocate or set that pointer or reference or whatever the frick and then your shit will crash when you need it to run.

    • 1 month ago
      Anonymous

      >wasn't C invented by boomers?
      Ritchie would have been 80 by now.

      C didn't invent null.

  3. 1 month ago
    Anonymous

    >Why does this trigger boomers
    Fricking lol. Its called PTSD. Null can segfault the system. Also those segfaults could cause memory corruption on a system level before OS memory protections got better. If you are writing a large program in C or C++ you learn very well to avoid null as much as you can so your system isn't constantly going down. Also avoiding null reduces the amount of time you have to spend checking for it.

    • 1 month ago
      Anonymous

      >Null can segfault the system.

      • 1 month ago
        Anonymous

        >null can segfault
        Try writing to 0 in memory and see what happens.

        >the thing that protects from corruption causes corruption
        genius nocodeshitter

        >mentioning that memory protection on all OSes hasn't always been perfect means that I am a no coder
        Based moron

        In C, if I want to manipulate some dynamically allocated structure inside a function, should I just pass that into the function as a pointer, modify that pointer inside the function and return void if nothing ever happens? I've always used NULL return and checked for that in the calling function, though I have to admit it's kind of tedious but that's what I'm used to.

        >passing as memory
        I prefer to pass an error enum as a pointer and a dynamic structure as a pointer to the function. Then I check if the error enum is false or not (zero is my no error status). I then use the enum is a switch statement depending on the errors that the function can return. I prefer to use that route because then I can know by the function signature if the function can error and by passing with a pointer I can often use the stack to mimic raii features.

        • 1 month ago
          Anonymous

          >null dereference
          Undefined behaviour.
          If we talk actual `mov [0], eax`, this is not segfaulting system. It SYSTEM segfaulting you.

    • 1 month ago
      Anonymous

      >the thing that protects from corruption causes corruption
      genius nocodeshitter

    • 1 month ago
      Anonymous

      In C, if I want to manipulate some dynamically allocated structure inside a function, should I just pass that into the function as a pointer, modify that pointer inside the function and return void if nothing ever happens? I've always used NULL return and checked for that in the calling function, though I have to admit it's kind of tedious but that's what I'm used to.

    • 1 month ago
      Anonymous

      you have no fricking clue what a segfault is
      there are no OS memory protections that got better
      look up the meaning of words, before you use them
      and dont talk about operating systems because you have no idea how they work either

      • 1 month ago
        Anonymous

        >t.stupid zoomer
        I remember when you could write to all memory and the OS didn't do shit to stop you. You could frick your whole system with a bad write. I remember when you could blue screen with a bad write. You fricking modern programmers are so spoiled you don't realize how good you have it now. I have to deal with morons half my age attempting to tell me how they think a computer works. Lurk more gay.

        • 1 month ago
          Anonymous

          but there is absolutely no reason why you shouldn't use null as a special value with some specific meaning. eg. the end of a linked list,
          and that has nothing to do with memory protection.

          as pertains to memory protection, if you dereference ANY value (and I don't think the value of null is even defined in the C standard?) that is not the one you expected, then that's undefined behaviour / a "segfault".

          explain to me what you are talking about.
          i want to learn.

          • 1 month ago
            Anonymous

            linked list is one of those cases where using null causes more problems than fixes

          • 1 month ago
            Anonymous

            What's the difference between using "a dummy node" and NULL? You still have to do the same checks.

          • 1 month ago
            Anonymous

            >you still have to do the same checks
            actually try to write the code (that you never wrote before)

          • 1 month ago
            Anonymous

            if (n->next == root)
            vs
            if (n->next == NULL)
            wozers soo much different

          • 1 month ago
            Anonymous

            ok now post the rest of the code

          • 1 month ago
            Anonymous

            what does the rest of the code have to do with this when the question was about checks specifically?

          • 1 month ago
            Anonymous

            because all linked list code has checks but I guess you're just too moronic for this

          • 1 month ago
            Anonymous

            and youre implying the checks are different every place?

          • 1 month ago
            Anonymous

            I'm implying that you're a nocodeshitter who never wrote a linked list in your life which is why you don't even comprehend the difference.

            How is it actually implemented? My first thought is as a struct {value ValueType, null Bool}. Why not just let programmers create a struct like this explicitly if the domain requires it?

            It's a special pointer value, usually 0, average OS has a special zero page just for the null address.

          • 1 month ago
            Anonymous

            i wrote (NULL terminated) linked lists often for hashtables, meanwhile you still cant talk coherently
            off the top of my head i cannot think of ONE instance where you have to check for the start/termination of a linked list, you wouldnt have to do a similar check in both NULL/sentinel terminated lists, sooner or later

          • 1 month ago
            Anonymous

            >linked lists in hash tables
            good job anon, I'm proud of you creating a data structure that's in some cases inferior to just using a tree

            funny how you're calling me a troony when "nullptr" is literally "change your entire codebase (that already uses 0 and NULL) to fit in with me", which is basically what you think trannies are.
            this is not an uncommon thing in C++, the geniuses in the standards committee add a newfangled "best practice" that you now have to use all the time. see braced initialization and other gunk.
            people who like c++ features just out themselves as people who have no taste
            [...]
            you are such a midwit it's unreal.
            news flash: software doesn't get fast because the compiler did some dead code elimination to make artificial microbenchmark number go up. software gets fast because you have engineers working on it who know the target hardware and know how to make it fast for that (boils down to how to design high throughput loops that aren't bottlenecked by memory accesses). everyone in HPC and games knows this.

            >funny how you're calling me a troony when "nullptr" is literally "change your entire codebase
            stick to the old shitty version if you don't like changes, troony

          • 1 month ago
            Anonymous

            you know there's nothing wrong with sucking the standards committee's wiener when c++2x (they work like one day a year and delay shit by 5 years, still no reflection in 2023 btw) comes out with new "best practices". it's 2023, sucking wieners is okay.

          • 1 month ago
            Anonymous

            >2023
            kek im getting old it's 2024 already

          • 1 month ago
            Anonymous

            I don't get paid to write millions of lines of shit code so I don't have a problem using sed to replace NULL with nullptr and typing "finally our language isn't shit" into git commit

          • 1 month ago
            Anonymous

            >I don't get paid
            you didn't need to say that. we can tell. are you gonna also going to s/0/nullptr/g?

          • 1 month ago
            Anonymous

            I never wrote 0 because I'm not moronic Black person so no I won't be ever doing that.

          • 1 month ago
            Anonymous

            NULL isn't real. it's all pointers in the end. one day you will understand this.

          • 1 month ago
            Anonymous

            null isn't a pointer, one day you will understand this

          • 1 month ago
            Anonymous

            why are you moving goalposts
            >in some cases
            total seethe

          • 1 month ago
            Anonymous

            Why are you a moronic redditor spamming something he doesn't even understand?
            What goalpost is being moved right now?
            >hurr durr I'm a moronic gorilla Black person
            Ok, and? Linked lists don't belong in hash tables, you being moronic is not my problem.

          • 1 month ago
            Anonymous

            >a sentinel value is better than null pointer
            filtered, go back to middle school

          • 1 month ago
            Anonymous

            yeah I can tell you were filtered by optimization, not that it matters because linked lists are worthless

          • 1 month ago
            Anonymous

            go ahead, explain your optimization by having a sentinel node in a linked list

          • 1 month ago
            Anonymous

            it is self explanatory when you implement a linked list instead of larping

          • 1 month ago
            Anonymous

            ive implemented linked lists since before you were born. now explain yourself or gtfo

          • 1 month ago
            Anonymous

            ok so you know everything I'd say, have a nice day, moronic nocodeshitting larper

          • 1 month ago
            Anonymous

            >he didnt provide an explanation
            im not surprised that you talk big words but have nothing to back them up with

          • 1 month ago
            Anonymous

            post your linked list implementation first, just like I already asked in

            ok now post the rest of the code

            >inb4 nooo I'm not the samegay
            Did I ask? Post code.

          • 1 month ago
            Anonymous

            sorry dumbdumb, but i asked you first, so go ahead, post yours and ill follow suit
            also, im not that anon as you already know

          • 1 month ago
            Anonymous

            not going to waste my time even trying to explain to a nocodeshitter, sorry

          • 1 month ago
            Anonymous

            >i dont know what im saying
            yea im still not surprised

          • 1 month ago
            Anonymous

            already wrote everything I needed to ITT, you being unable to comprehend is not my problem

          • 1 month ago
            Anonymous

            >i dont know what im saying please stop
            yea im still not surprised

          • 1 month ago
            Anonymous

            I lose nothing by you being unable to write a basic linked list.

          • 1 month ago
            Anonymous

            i did say
            >ive implemented linked lists since before you were born
            are you a little confused, boy?

          • 1 month ago
            Anonymous

            yeah so feel free to post your shitty code and I will btfo you by improving it

          • 1 month ago
            Anonymous

            as i said, you first, love. prove you are as hot as you think you are. follow the order of the arguments made

          • 1 month ago
            Anonymous

            yeah I'll go frick your mother in the meantime

          • 1 month ago
            Anonymous

            i hope youll have an enjoyable ride anon :^)

        • 1 month ago
          Anonymous

          i really hope this is bait and there are no actual dumb frickers like this alive

          >I remember when you could blue screen with a bad write.
          >t. "oldgay" "greybeard hacker" larper
          no you dont you fricking idiot because the first windows version to have the blue screen (win nt 3.1) was already making use of protected mode on the cpu, and so virtual memory too (fun fact: this is when such a thing as a "segfault" even began to exist, because it had no place beforehand, but you dont know that 🙂 )

          you literally cannot do what you say on any OS that runs on a cpu in protected mode (these have been in use since before you were born)

          t. actual operating system programmer

          but there is absolutely no reason why you shouldn't use null as a special value with some specific meaning. eg. the end of a linked list,
          and that has nothing to do with memory protection.

          as pertains to memory protection, if you dereference ANY value (and I don't think the value of null is even defined in the C standard?) that is not the one you expected, then that's undefined behaviour / a "segfault".

          explain to me what you are talking about.
          i want to learn.

          >as pertains to memory protection, if you dereference ANY value that is not the one you expected then that's [...] a "segfault".
          no its not
          i urge you to look up what a segfault is
          hint: the full name is segmentation fault
          hint 2: segmentation fault actually has a meaning and it doesnt stand for any general "whoopsie doopsie programeing error xD :333"

          • 1 month ago
            Anonymous

            >t.operating system programmer
            So someone who didn't actually make applications for the shit he was building and just trust that his theoretical bullshit actually worked back then. How about you actual write some shit for the garbage OS that you programmed and then we'll talk.

        • 1 month ago
          Anonymous

          your dad having an unprotected write into your mom has corrupted the world

  4. 1 month ago
    Anonymous

    Why do trannies always make these bait threads with questions that start on false premises?

    • 1 month ago
      Anonymous

      Obnoxiousness. The thought of triggering someone is extremely rewarding for them.
      Why? They have a poor gut flora which doesn't produce a healthy amount of dopamin and other neurotransmitters for them. So they subconsciously substitute with annoying behavior which creates a small spike of endogenous dopamin in anticipation of reaction.
      They are ill, remember that.

  5. 1 month ago
    Anonymous

    >write 4 characters instead of 1
    i mean... you do you i guess

    • 1 month ago
      Anonymous

      0 and (void *)0 are not always the same thing you moronic codelet pajeet

      • 1 month ago
        Anonymous

        it literally is? casting in C has literally no purpose but satisfying the compiler (that would complain but accept it anyway).

  6. 1 month ago
    Anonymous

    Tagged unions deprecate it

  7. 1 month ago
    Anonymous

    The boomer that created it called it his billion dollar mistake.
    He did it because it was just so easy to do.
    Imagine he didn't cuck and there were no null pointer exceptions anywhere.

    • 1 month ago
      Anonymous

      Yeah
      Imagine having to initialize every variable at declaration
      Maybe even having to allocate memory for dummy objects that you would throw away later
      That would never be impractical

      • 1 month ago
        Anonymous

        C++ doesn't have this problem

        • 1 month ago
          Anonymous

          You mean you can't create a null pointer in C++?
          Hm
          I mean I haven't touched it for like 10 years now but I seem to remember that you can
          Or do you mean that the problem never arises if you write your code in some specific way?

          • 1 month ago
            Anonymous

            You can, you can also point a shotgun at your head and pull the trigger, are you some kind of mentally ill moron who needs to be protected by force?
            My point is that you don't need to because C++ has references.

          • 1 month ago
            Anonymous

            I am not, but the guy who called it a mistake referred to the billions of mentally ill morons who have caused null pointer segfaults and exceptions over the years

          • 1 month ago
            Anonymous

            yes it's very easy to find a scapegoat instead of telling everyone that they're fricking moronic

          • 1 month ago
            Anonymous

            The truth is that everyone is fricking moronic and because of that, uninitialized pointers including nulled pointers was a mistake
            Forcing people to initialize to something that can't cause segfaults would according to some people solve this
            It wouldn't, it would just push the error one step down the line.
            The solution is to not be moronic but almost no one can pull that one off

          • 1 month ago
            Anonymous

            I never experienced a segfault

            The "mistake" wasn't the word NULL, it was allowing pointers to be set to a nothing value
            In fact isn't NULL in C just
            #define NULL 0
            ?

            Basically, yeah, on my system it's just:
            /* A null pointer constant. */

            #if defined (_STDDEF_H) || defined (__need_NULL)
            #undef NULL /* in case <stdio.h> has defined it. */
            #ifdef __GNUG__
            #define NULL __null
            #else /* G++ */
            #ifndef __cplusplus
            #define NULL ((void *)0)
            #else /* C++ */
            #define NULL 0
            #endif /* C++ */
            #endif /* G++ */
            #endif /* NULL not defined and <stddef.h> or need NULL. */
            #undef __need_NULL

          • 1 month ago
            Anonymous

            >13 lines of preprocessor
            And then you just ignore it and type = 0 lol

            yes monadic types would have been better but there's more nuance here
            not having a "nothing" value for pointers doesn't actually solve as many bugs as you think, because pointers still have so many other possibly invalid values (dangling pointers etc)
            the real core issue is memory safety for a systems programming language. the pros of cons of that have been exhaustively debated for years now (see rust, friction vs security etc blah blah blah)

            It's not just systems programming
            Basically every language has at least one nothing value these days (i say at least one as i think JS has three?)

          • 1 month ago
            Anonymous

            I type nullptr because my language isn't an outdated toy and actually has null as a keyword.

          • 1 month ago
            Anonymous

            >has null keyword
            >ignores it
            Even better?

          • 1 month ago
            Anonymous

            yeah goodluck with that in C++

          • 1 month ago
            Anonymous

            nullptr is a testament to C++'s bad design and nothing else. they added it to fix as a very stupid solution to overload resolution rules ambiguities.

          • 1 month ago
            Anonymous

            >nullptr is le bad because um because it just is, ok?
            C doesn't even have boolean types without #include <stdbool.h> dilate and seethe.

          • 1 month ago
            Anonymous

            funny how you're calling me a troony when "nullptr" is literally "change your entire codebase (that already uses 0 and NULL) to fit in with me", which is basically what you think trannies are.
            this is not an uncommon thing in C++, the geniuses in the standards committee add a newfangled "best practice" that you now have to use all the time. see braced initialization and other gunk.
            people who like c++ features just out themselves as people who have no taste

            >optimal code is... le bad

            you are such a midwit it's unreal.
            news flash: software doesn't get fast because the compiler did some dead code elimination to make artificial microbenchmark number go up. software gets fast because you have engineers working on it who know the target hardware and know how to make it fast for that (boils down to how to design high throughput loops that aren't bottlenecked by memory accesses). everyone in HPC and games knows this.

          • 1 month ago
            Anonymous

            as i mentioned, having an Option<T> for pointers does not really solve that many memory safety issues by itself in a systems programming language because there are so many ways to have a nice day in the foot anyway.

            null address is just a shitty sentinel value. There is literally nothing wrong with the address zero other than that you'd get protection fault writing to it most everywhere. I don't understand how after decades morons think sentinel values are an appropriate solution. They literally use valid states as a value indicating something special. It's fundamentally wrong.

            it's okay to use sentinel values for pointers because there are so many other possible ways for them to be invalid anyway, so might as well get the convenience of a sentinel value

          • 1 month ago
            Anonymous

            In terms of Cisms, having sum types would because your compiler will literally erase null checks if it assumes what you're doing can never be null and I have in fact seen this in real working code that broke because of newer compilers.
            Also C already has tagged unions, but most C shitters, especially on IQfy don't know and using them is made hard by C's shitty design. Unfortunate C++s are just dogshit java design pattern pajeet garbage, but most all C++ committee shit is a fricking joke anyhow.

          • 1 month ago
            Anonymous

            >your compiler will literally erase null checks if it assumes what you're doing can never be null
            100% im against most of the UB-based optimizations and think they're pretty idiotic but it's not as bad as it sounds
            it will only assume a pointer isn't null if you de-reference it in your code without checking if it's null, so your code had a bug anyway. or at least that's what it's supposed to do, if it does it in other cases then that's a compiler bug that the implementers need to fix.
            >Also C already has tagged unions
            tagged unions have their uses but they're also overrated in some ways. they're relevant enough that a new programming language should definitely have them as a feature though.

          • 1 month ago
            Anonymous

            >optimal code is... le bad

      • 1 month ago
        Anonymous

        >Maybe even having to allocate memory for dummy objects that you would throw away later
        what did they mean by this?
        >Imagine having to initialize every variable at declaration
        i program in c and it's really not that bad. it becomes muscle memory to type "= 0" and "= {0}"
        it's not a big deal and compilers warn you if you forget
        if it's a real issue for you then you need better tools

        • 1 month ago
          Anonymous

          The "mistake" wasn't the word NULL, it was allowing pointers to be set to a nothing value
          In fact isn't NULL in C just
          #define NULL 0
          ?

          • 1 month ago
            Anonymous

            yes monadic types would have been better but there's more nuance here
            not having a "nothing" value for pointers doesn't actually solve as many bugs as you think, because pointers still have so many other possibly invalid values (dangling pointers etc)
            the real core issue is memory safety for a systems programming language. the pros of cons of that have been exhaustively debated for years now (see rust, friction vs security etc blah blah blah)

  8. 1 month ago
    Anonymous

    NULL is basically like zero in math.

    • 1 month ago
      Anonymous

      null is literally just the german word for zero.

  9. 1 month ago
    Anonymous

    >mentioning that memory protection on all OSes hasn't always been perfect means that I am a no coder
    memory protection is a meme, before you ever segfault, you will first and foremost corrupt all memory used by malloc

  10. 1 month ago
    Anonymous

    the only problem with null is that most languages implementing it do not provide a consistent way to tell the caller that a function could return it
    a function can fail but the caller could assume it succeeded and do something stupid
    the magic of a union/result type is that it returns null in a way that forces the caller to handle it

  11. 1 month ago
    Anonymous

    How is it actually implemented? My first thought is as a struct {value ValueType, null Bool}. Why not just let programmers create a struct like this explicitly if the domain requires it?

    • 1 month ago
      Anonymous

      Oh of course. I learned this and forgot all about it.

  12. 1 month ago
    Anonymous

    i write `0` instead in my code
    to me 0 is the default value, it reduces cognitive overhead a bit to have a single literal that always means "default value"
    i know it makes typegays seethe but it werks for me and my code

  13. 1 month ago
    Anonymous

    null address is just a shitty sentinel value. There is literally nothing wrong with the address zero other than that you'd get protection fault writing to it most everywhere. I don't understand how after decades morons think sentinel values are an appropriate solution. They literally use valid states as a value indicating something special. It's fundamentally wrong.

    • 1 month ago
      Anonymous

      Using a null or 0 value forces a seg fault. The alternative would be randomly either seg fault or actually writing to random memory that your program owns, causing other variables to change values

  14. 1 month ago
    Anonymous

    My code never contains the keyword. Suck on it, troon.

  15. 1 month ago
    Anonymous

    just use a language that handles memory for you if you're not smart enough to do it yourself
    99% of "programmers" have no business even trying to touch memory, there's a reason everyone moved on from C a long time ago

  16. 1 month ago
    Anonymous

    Why did zoomers read a blog about null and suddenly have an opinion about it?
    It's pretty annoying.

    • 1 month ago
      Anonymous

      because morons who never did something have a lot to tell you about it

  17. 1 month ago
    Anonymous

    what are you even saying mass reply gay

  18. 1 month ago
    Anonymous

    I think a more pertinent question here is : why can't you store a byte in it?
    Literally why?
    Are we, as programmers... getting israeliteed?

    • 1 month ago
      Anonymous

      post your linked list implementation first, just like I already asked in [...]
      >inb4 nooo I'm not the samegay
      Did I ask? Post code.

      sorry dumbdumb, but i asked you first, so go ahead, post yours and ill follow suit
      also, im not that anon as you already know

      i did say
      >ive implemented linked lists since before you were born
      are you a little confused, boy?

      why are you moving goalposts
      >in some cases
      total seethe

      Why are you a moronic redditor spamming something he doesn't even understand?
      What goalpost is being moved right now?
      >hurr durr I'm a moronic gorilla Black person
      Ok, and? Linked lists don't belong in hash tables, you being moronic is not my problem.

      >moronic newbie who r***dit types accusing people of being moronic redditor spammers

      Ironic

      • 1 month ago
        Anonymous

        downboating you because i never accused anyone of being from reddit

  19. 1 month ago
    Anonymous

    zero is not a real number anyway that's why everything is undefined if you work on it

  20. 1 month ago
    Anonymous

    It means “zero” in germ(an)

  21. 1 month ago
    Anonymous

    null is good in c morons must return -1 for some specific value

Your email address will not be published. Required fields are marked *