From: dblack@... Date: 2006-11-07T21:29:11+09:00 Subject: Re: Bikeshed: No more Symbol < String? Hi -- On Tue, 7 Nov 2006, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Bikeshed: No more Symbol < String?" Is "bikeshed" shorthand for "unimportant"? :-) I would disagree strongly in this case -- not on a global scale, perhaps, but in the context of Ruby programming. > on Tue, 7 Nov 2006 15:34:15 +0900, Kornelius Kalnbach writes: > > |It seems matz decided to remove String from Symbol's ancestors 5 days > |ago: > > Even though it is highly against DuckTyping, people tend to use case > on classes, and Symbol < String often cause serious problems. I found > several of these even in the standard distribution libraries. That > encouraged me to remove String from Symbol's superclass. It sounds like it's related to what Charlie Nutter was talking about: the problem that Symbol reduces the "contract" of String. I know Ruby isn't Eiffel :-) and also that inheritance in Ruby is, as you once said, mostly a matter of shared implementation and not hierarchy. Still -- I think the change is probably best, not only to encourage duck typing but also based on the relation between the two classes. David -- David A. Black | dblack@wobblini.net Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.org