RE: [GD-General] Java bitching
Brought to you by:
vexxed72
From: Brian H. <bri...@py...> - 2002-01-04 17:51:33
|
> Let me add a Java gripe! > > I was disappointed that something like > the following Java code doesn't compile: > > // Loss of precision: int to byte > byte [] a = { 0xff, 0x7f }; > > Forcing me to do this: > > // Okay > byte [] a = { (byte)0xff, (byte)0x7f }; Isn't that a compiler problem and not a language problem, or does the language assume that bytes are characters? If it's a compiler problem, then I won't fault Java for it, but if it's a language thing -- um, ick. I'm all for language purity, but when it interferes with actual, practical getting work done (like Eiffel's lack of hex constants), then I'm against it. What I DON'T like are syntactic helpers that are purely stylistic; however, this doesn't seem to be the case. Brian |