+ 2
constructors necessity
Almost in all `OOP` languages we have constructors so: 1.whats is the main necessity of constructor and may it be removed from OOP in future languages? 2.Is there any object programming language does not need to constructor?
2 odpowiedzi
+ 5
Why would you want to remove constructors? How else are you going to initialise your class members?
+ 1
Constructors are called when you create an object of a class, so I doubt that they may be removed. If it happend then whole class semantics wouldn't have any point, so we would go back to C language ^^
And mentioned above C has no constructors nor classes.