Log in

No account? Create an account
'Twas brillig, and the slithy toves did gyre and gimble in the wabe [entries|archive|friends|userinfo]

[ website | Beware the Jabberwock... ]
[ deviantArt | the-boggyb ]
[ FanFiction | Torkell ]
[ Tumblr | torkellr ]

[Random links| BBC news | Vulture Central | Slashdot | Dangerous Prototypes | LWN | Raspberry Pi]
[Fellow blogs| a Half Empty Glass | the Broken Cube | The Music Jungle | Please remove your feet | A letter from home]
[Other haunts| Un4seen Developments | Jazz 2 Online | EmuTalk.net | Feng's shui]

[Thursday 15th April 2010 at 5:46 pm]

[Tags|, , ]
[Feeling |annoyedannoyed]

Oh yes, and I almost forgot my recommended daily software rant: in Java, all bytes are signed. There is no such thing as an unsigned byte.

A side-effect of this is that a statement such as byte foo = 0xAA; gives a compiler error.
Link | Previous Entry | Share | Next Entry[ One penny | Penny for your thoughts? ]

From: pewterfish
Thursday 15th April 2010 at 9:57 pm (UTC)
Yes, that can be a bit of a pain in the arse, especially when you're trying to talk to hardware. The canonical solution is to always allocate one storage class larger than you need (put a char in a short, a short in an int, and so on). It's a stupid, wasteful fix, but it does work if you need signedness that much.
(Reply) (Thread)