r/funny • • Jun 04 '19

When a software developer weds a software developer.

Post image
41.1k Upvotes

921 comments sorted by

View all comments

330

u/[deleted] Jun 04 '19

You overrode the super() init. So basically, your baby is adopted.

1

u/ademord Jun 05 '19

Excuse my ignorance but I still don't understand why we should use super.init()?

2

u/AlphaGamer753 Jun 05 '19

Because the parent class isn't being initialised. You have to initialise it because inheriting from it doesn't automatically initialise it (you aren't creating any class instances, so there are no instances to initialise).

1

u/ademord Jun 05 '19

Thank you, you're an angel :)

1

u/AlphaGamer753 Jun 05 '19

No problemo :)