|
![](/i/fill.gif) |
On 14/08/2012 06:38 PM, Warp wrote:
> Invisible<voi### [at] dev null> wrote:
>> - Unsigned integers have names prefixed with "u", and signed integers
>> have no prefix. Except byte, which is the other way around: "byte" and
>> "sbyte". WTF?
>
> Why would you expect bytes to be signed by default?
I don't know about "default", but a consistent naming scheme would be
nice...
>> - The "char" type works with Unicode. Well done. Oh, but wait... It only
>> stores 16 bits, and yet Unicode actually requires 24 bits to represent a
>> single code-point. So this "Unicode character" only actually covers the
>> Basic Multilingual Plane. FAIL!
>
> I'm assuming it uses UTF-16.
Perhaps actual /strings/ allow storing all possible Unicode code-points.
However, char, the type of a single character, apparently covers the BMP
only. If you're going to go to all the trouble of actually supporting
Unicode, why not support the whole thing?
> Using operator+ for string concatenation is pretty common. I have never
> had any kind of confusion with it. (You would have to come up with a
> really artificial example to deliberately make it confusing.)
>
> Automatically converting the right hand side to a string sounds more
> dubious to me. Sounds like it may easily be done inadvertently, causing
> all kinds of bugs.
Yeah, sounds like more the sort of thing you'd expect in a scripting
language.
OTOH, it appears that it's the only autoconversion that can happen.
Pop quiz: if x is a string and y is a delegate, does it do delegate
concatenation or string concatenation?
Post a reply to this message
|
![](/i/fill.gif) |