Hacker News new | comments | show | ask | jobs | submit login

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.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact