On Thursday, July 12, 2012 18:25:03 David Piepgrass wrote:
> I'm putting this in a separate thread from
> http://forum.dlang.org/thread/uufohvapbyceuaylo...@forum.dlang.org
> because my counterproposal brings up a new issue, which could be
> summarized as "Constructors Considered Harmful":
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=8381

I think that adding constructors to a type from an external source is 
downright evil. It breaks encapsulation. I should be able to constrain exactly 
how you construct my type. If you want to create a free function (e.g. a 
factory function) which uses my constructors, fine. But I'm completely against 
adding constructors externally.

- Jonathan M Davis

Reply via email to