On Tue, Jun 19, 2012 at 5:17 PM, Hal Fulton <[email protected]> wrote:
> Personally, I don't have a problem with "reducing the contract"
> of a String.

It's just that Ruby is not particularly suited to using inheritance in
different ways.  In Eiffel you can do all this and do it visibly.  In
Ruby there's just mixing in modules and class inheritance.

> Freezing an object also reduces its contract.

Kind of.  But I consider that a special case because freeze prevents
all mutations but not other operations.  It also does not restrict the
range of valid state - it just freezes it.

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to