From: Joel VanderWerf Date: 2006-06-15T13:52:25+09:00 Subject: Re: A plan for another unicode string hack Dave Howell wrote: > > On Jun 14, 2006, at 9:17, Austin Ziegler wrote: > > Yes, I undertstand. Making #size and #length return different values > is a mistake. Without referring to documentation, how would you know > which returns the number of characters and which one returns the > number of bytes? > > I cannot agree. "Length" (to me) unavoidably implies that it's the > answer to the question "How LONG is it?" I expect the answer to be "n > characters long." > > "Size" is the answer to "How BIG is it?" as in "How much space does this > thing take up?" and if it's a UTF-8 string, I expect an answer like "1 > byte per character + one more byte per character not in the 7-bit ASCII > range" That's not a bad argument, but Hash#size and Array#size don't behave that way in ruby. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407