5

When gdb doesnt automatically deferences `this` but you just explicitly deference it at the start of every method:

Ps: the reference variable was literally called `dbug_mee_dawg`
Ps2: Java programmers will ***never*** understand this /s

Comments
  • 1
    Hi, Java developer here. Care to explain?
  • 1
    @CluelessBanana
    *clears throat*
    In java, when a instance method has to access the host instance attributes, the keyword `this`, that acts like a reference (like any object) to the host instance, is used.
    In c++, almost the same thing exist except for one little detail:
    Pointers, that bad guys that can fit so frigging many segfaults in the program when you least expect it bcuz they access directly to raw memory. Seems like Gosling thinks it's gross cuz he replaced all with object-type references: all their assignment and arguments are by reference (btw do you srsl have to use the copy constructor explicitly?) and then in theory you never can got a segfault.
    And then, in c++ is actua- that's right, another pointer.
    gdb usually deferences all typed pointers, but for methods' `this`es it only print the memory address.
    That leaded to my silly, easy, nice hack, and *that* leads on this meme.
    ###*%~~~___THE END___~~~%*##
    PS: Actually i enjoyed that
    PS: 23 chars left :P
  • 0
    @dfox , please see my up comment and judge if i deserve some sort of medal
  • 1
    longest non-post-edited 2 cents that actually made full sense :P
Add Comment