Re: Symbols and Strings...

2012-06-20 Thread Robert Klemme
String could implement.  If so, perhaps a class or module could be >> defined for that interface and incorporated into both classes as >> appropriate. >> >> From what I've seen, the most frequently voiced desire is to be able to >> use apparently equivalent symbo

Re: Symbols and Strings...

2012-06-20 Thread Robert Klemme
On Tue, Jun 19, 2012 at 10:12 PM, Hal Fulton wrote: > >> > 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

Re: Symbols and Strings...

2012-06-19 Thread Robert Klemme
On Tue, Jun 19, 2012 at 5:17 PM, Hal Fulton 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

Re: Symbols and Strings...

2012-06-19 Thread Robert Klemme
On Tue, Jun 19, 2012 at 12:31 AM, Eric Hodel wrote: > This happened (see thread at [ruby-core:9188]) but was reverted.  I can't > think of the proper keywords to find the reason for the reversion. I one has Symbol inherit String then "is a" relationship is violated. You cannot use the sub class