back2dos / tinkerbell

MIT License
83 stars 8 forks source link

i think i wish the constrcutor was public #24

Closed raould closed 12 years ago

raould commented 12 years ago

it is sorta sad to end up manually inserting public function new() {} all the time.

back2dos commented 12 years ago

The constructor defaults to public, if the instance takes parameters through = _, but will leave it untouched otherwise. The reasoning behind this is that usually, an empty public constructor usually doesn't make sense.

Making this the default behavior is a matter of a few keystrokes, I just doubt it's a good idea. If you really have this a lot, then this smells like an anemic domain model.

raould commented 12 years ago

hm, ok, sorry i must be confused, then there's no issue. thanks.

back2dos commented 12 years ago

Ok. Well in case you change your mind, let me know ;)