|
![](/i/fill.gif) |
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?
> - 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.
> - "x + y" performs addition. Unless either argument is a string, in
> which case the other is converted to a string as well (if not a string
> already) and the strings are concatenated. Unless both arguments are
> delegates, in which case they are concatenated. (I guess there's a
> /reason/ the Java guys claim that operator overloading is evil!)
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.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |