From: Martin DeMello Date: 2004-08-11T15:46:27+09:00 Subject: Re: string.each_char Gavin Sinclair wrote: > > Presumably you use this "compact" structure because it's one object > rather than many? But then, each time you iterate it, you're > generating #{string.length} temporary objects. Perhaps it would be > more "compact" in the long run if you used an array of strings or > symbols? Or a Set, depending on your access requirements. Hm - good point. We'd need to go down the C path and separate 'char' from 'string', so that the former could be Fixnum-type singletons. Yet another place where C thinking doesn't map to ruby best-practice :) martin