[Nitro] help with og!

David Corbin dcorbin at machturtle.com
Sat Dec 3 21:59:00 EST 2005


On Saturday 03 December 2005 01:52 pm, zimba-tm wrote:
> > In an ideal world, it would be impossible to construct an invalid object.
> > Some objects have no concept of 'default' parameters.  It just doesn't
> > make sense.
>
> I don't agree with you. In a real world, defect objects are created
> and it doens't necessarily matter until you can't detect that they
> aren't 

I'm not 100% sure I understand you, and of course you're entitled to your 
view.  But I think it is an important part of encapsulation for a given class 
to to be the only one that knows what has to be done to be 'valid'.  If I 
have to do something after instantiating an object, than something else 
presumable knows what has to be done.

> In an ideal world, ruby would provide the facilities to specify 
> an attribute's type instead of using property. 

Not in my ideal world.  That would make things couple way too tightly.  I 
don't want static typing.

> So your classes are 
> specifically built anyway. What difference between that and using
> 'default' parameters, except that the latter is at a language level ?

As I said above, encapsulation.

>
> --
> Cheers,
>   zimba
>
> http://zimba.oree.ch
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general



More information about the Nitro-general mailing list