From: Markus Date: 2004-10-14T01:05:27+09:00 Subject: Re: Ruby Directions (was Re: quality of error messages) On Wed, 2004-10-13 at 02:19, Robert Klemme wrote: > "Markus" schrieb im Newsbeitrag > > > > > > still... for coding, i love slice! / gsub! etc. they are > > > amazingly useful constructs. i can't imagine living without > > > them :) > > > > The odd thing is, all you are generally getting with them is a bit > > of syntactic sugar. Consider the relationship between: > > > > s = gsub(p,v) > > s.gsub!(p,v) > > > > i = i + k > > i += k > > It's not only sugar. It's different semantics and different performance > (see the other post with the benchmark). There are enough circumstances > where you don't know whether someone else still holds a reference to an > instance at hand. As an example, that's the reason why Strings when used > as Hash keys are duped and frozen if they are not yet frozen. > > Kind regards > > robert > In your previous response to this same post you at least included the rest of my statement: > Unless you have lent a friend a reference to s and are using it to > send secret messages, you aren't really depending on the mutability > of strings so much as the modifability of variables. In my response I further clarified my point, that most users of gusb! use it not because they want the modification to affect some other reference to the same string, but simply as a shorthand. Instead of trying yet again, to clarify a point that we both obviously understand, I will address a more interesting point: Why do you keep taking my remarks out of context to "rebut" them? -- Markus