From: Dave Thomas Date: 2008-01-28T12:50:09+09:00 Subject: Re: Symbol#empty? ? On Jan 27, 2008, at 8:54 PM, Yukihiro Matsumoto wrote: > * allowing :"" > * removing Symbol#empty? For me, the answer depends on what you (Matz) feel that symbols are. Back when they were simple atoms, then clearly #empty? would make no sense (not just because : was silly, but also because the concept of emptiness made no sense for things that were essentially one dimensional). But, now, we have strange things like :"a b", which means symbols are more stringlike. And once symbols have a length, they should probably respond to empty? too. But, either way, I feel that the current idea of a "symbol" is somewhat confused, and I'm not sure I see the point of the added complexity. One the one side, we have the original idea of a symbol being something that could be stored in a symbol table (where the symbol table was used to store names that were valid in the language). Or the other side, we have the idea that symbols are kind of like read- only, immediate strings (although I don't see why they were thought to be read only, as wouldn't :"abc"[1] = 'd' simply return :"adc", a new symbol?). I'd personally say that right now we seem to be stuck in a compromise between the two positions. Symbols are neither one thing nor the other. They have a length, which implies that they have a content, just like strings. But they have almost no string-like methods, so they are crippled strings. From my perspective, I'm not sure I see the benefit of all these changes. What use cases are we addressing with the ability to do File.read("war_and_peace.txt").intern? And what unexpected DOS loopholes are we opening in the process? So, if there's still room for debate, I'd personally be on the side of returning to the old Symbols are symbols implementation and losing empty? Dave