Strings in DWT
DBloke
DBloke at nowhere.org
Sat Feb 23 16:16:07 PST 2008
> Though since they're porting from Java, and a Java String[1] is
> immutable,
Correct :)
an invariant string is actually the correct translation...
> (And with array pseudo-methods, AFAICT the only aspect of Java String
> use that can't be emulated exactly is the use of '+' for concatenation
> instead of '~'.
True, I still don't get why it is believed using + as a concatenation
operator is so confusing for a string? coming from a C/C++ and Java
background I personally find ~ confusing it somehow reminds me of the
two's compliment operator.
It's been a while since I used Java though, so I may be
> overlooking something)
Nope your memory serves you correctly :)
>
>
> [1] Mutable strings are implemented by StringBuffer, IIRC.
Yes and no StringBuilder is now favoured over StringBuffer unless
multiple threads need access to the StringBuilder object(s):)
More information about the Digitalmars-d-dwt
mailing list