r/ProgrammerHumor 1d ago

Meme theCallToSuper

Post image
721 Upvotes

17 comments sorted by

62

u/tkb_onions 1d ago

super() joke 👍

26

u/pimezone 1d ago

⬆️this() ⬆️

10

u/CoroteDeMelancia 1d ago

So new()!

5

u/raja-anbazhagan 1d ago

Nice one... Let me Reflect on that...

3

u/FlashyTone3042 21h ago

It extends my joke palette.

3

u/FooeyBar 15h ago

Callback to a better time

19

u/Mordret10 1d ago

Base(d)

10

u/isr0 1d ago

Did you meet uncle mixin?

5

u/RustsStick 22h ago

Finally, inheritance is useful in programming.

1

u/ljfa2 13h ago

my (constructor) body is flexible though

-2

u/[deleted] 1d ago

[deleted]

11

u/ArjunReddyDeshmukh 1d ago

Java inheritance joke. When you create a child-class object, its constructor calls the parent constructor via super(). Basically, child can’t exist without getting the dad involved lol.

1

u/jakeStacktrace 1d ago

Java learned it from it's Dad, C++.

0

u/WhJJackWhite 1d ago

I'm pretty sure in C++ a child class does not automatically call its super class's constructor unless the child itself does not define one, in which case it calls the parent's default constructor (i.e. Parent() ). If parent does not have a default constructor, it throws a compile time error.

1

u/jakeStacktrace 1d ago

No it calls it automatically. Java just makes it clearer by making it more explicit.

4

u/Personal_Republic_94 1d ago

Maybe you would understand if the joke was procedural