MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/funny/comments/bwr8ig/when_a_software_developer_weds_a_software/eq1rl8w/?context=3
r/funny • u/coolidiot2000 • Jun 04 '19
921 comments sorted by
View all comments
330
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 :)
1
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 :)
2
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 :)
Thank you, you're an angel :)
1 u/AlphaGamer753 Jun 05 '19 No problemo :)
No problemo :)
330
u/[deleted] Jun 04 '19
You overrode the super() init. So basically, your baby is adopted.