From: Alexander Kellett Date: 2004-10-12T22:36:13+09:00 Subject: Re: Ruby Directions (was Re: quality of error messages) On Tue, Oct 12, 2004 at 10:23:12PM +0900, Gavin Sinclair wrote: > Perhaps there are some uses of strings for which immutability makes > performance sense, and some uses for which it doesn't. I couldn't be > bothered thinking about it :) i can't imagine many cases where its less performant in fact. immutable strings with cow are obviously far faster for copying than mutable strings and as with most systems its the copy / construction of strings rather than the iteration that takes the time i'd say its logical that they should be immutable. (if you look at the most common c/c++ programs (excepting apps using trolltech's qt which solves the problem fairly neatly) you'll see that strcpy and memory allocation take up a huge chunk of execution time) still... for coding, i love slice! / gsub! etc. they are amazingly useful constructs. i can't imagine living without them :) mvg, Alex