Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@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
Related Rants
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
joke/meme
improvise
debugging
overcome
debug
c++
gdb
bear grylls
adapt
references
this
pointers