On Thu, Jun 21, 2012 at 12:25 AM, Hal Fulton wrote:
>
> On Wed, Jun 20, 2012 at 5:06 PM, Jeremy Bopp wrote:
>>
>> So then, in what cases would it be helpful to use them interchangeably?
>> Is it possible to define a common, useful interface that both Symbol
>> and String could implement. If so,
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
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
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