News for hackers. Stuff that matters.
Re:Red Hat's top secret Java Killer/Successor: The Ceylon Pr... by fleitz on Wednesday April 13, 2011 @03:15AM (#2441129)
Constructors are stupid and violate one of the principle ideas behind OO which is separation of concerns.

What initializes a data structure should not care how the data structure was allocated. It's two functions one () -> T and T -> T allow them to be first class citizens.

If you want to combine them use a static method that simply invokes the initializer after the allocator (which is how it works anyway, and how new is implemented in both Ruby and Obj-C). And it's not like it solves any real problems as it's perfectly alright to have uninitialized and incorrectly initialized objects with current constructors.

There are no comments on this comment yet.