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
-
It can be, but only when assuming the parent doesn't need any parameters to be constructed. Languages like java and c# and sometimes js does that.
Otherwise the computer will do it's job and complain about the id10t not filling in the values. -
The point is, u could wish redefine conductor entirely
Up to u of u need parent constructor or not
Don't redefine constructor in child, if u don't wish to face this problem -
Because of the concept of encapsulation.
The super class might not be in a valid state until you call it's constructor -
Inxentas7892yIt IS automatic when you write no new constructor.
C## has nice syntax for it though. It can be quite elegant in some languages.
public void MyConstructor (val) : base (val)
What's the fuckin point when a language makes you call the constructor of a parent class in the child class before you can use the inherited items?
Why do I need to call `super()` every time in my constructors? Why can't this be automatic?
rant