Is all this Invarient **** er... stuff, premature optimisation?
Steven Schveighoffer
schveiguy at yahoo.com
Mon Apr 28 14:02:45 PDT 2008
"Walter Bright" wrote
> Lars Ivar Igesund wrote:
>> After working with Java for quite some time, I have naturally drifted
>> from
>> using invariant strings to stringbuffers.
>
> Java strings lack slicing, so they're crippled anyway. I believe that
> slicing is one of those paradigm-shifting features, so I am not making an
> irrelevant point.
Java's String.substring(start, last) works just like slicing...
Not that I don't love D slicing above calling a function, but saying that
Java doesn't have slicing is completely false.
Where they lack is in the support of mutable strings, and especially having
strings be treated as native arrays. D excels in those areas.
-Steve
More information about the Digitalmars-d
mailing list