32

wasted my 30 minutes by calling sizeof() instead of strlen(). Daamn !!

Comments
  • 1
    @FrodoSwaggins oh ... just realized that... immature me !!
  • 2
    @FrodoSwaggins That was the most "It's GNU/ Linux, not Linux!" thing I have ever read.
  • 1
    @FrodoSwaggins NEEEEEEEEEERD

    Doesn't matter. Nothing is really "called" because c doesn't run, asm does.

    If you really wanted to be anal about something that doesn't matter, you could say it's not callable because it's an operator.
  • 1
    @iamavalos Proceed
  • 4
    @iamavalos You made me actually laugh out loud.
  • 1
    @AlgoRythm C/C++ are meant to be baremetal anyway and require a lot of familiarity with the system to use properly, why would you object to an absolutely valid correction? There are billions of tiny details that the language depends on, the more you know the better.

    sizeof() being a compile time only thing does matter, both when judging the runtime cost and output size of a program and when using sizeof() in compile time computations or in C++ template metaprogramming. It might also trip someone up if they try to use sizeof() like a runtime function by eg. trying function pointer stuff with it.
  • 3
    @RememberMe

    *sigh*

    because the rant uses "call" as a replacement for "use".

    "by using sizeof instead of strlen"

    The correction is unnecessary, and reminds me of all those anal asshats that unironically do the GNU/Linux meme
  • 1
    @AlgoRythm I see your point, but then one could argue that your reaction is a bit extreme too.

    Anyway, I think all points have been made, don't want to let this spiral. Have a good day man, hope whatever you're working on (the C++ UI library?) goes well :)
  • 0
    OMG, I seem to trigger a debate in an serious topic. By accident I came to know about deeper stuffs. Much glad. Thank you :)
Add Comment