Re: News for Java?
On 05-01-2011 23:41, Mike Schilling wrote:
"Arne Vajh?j" <arne@vajhoej.dk> wrote in message
news:4d250b12$0$23758$14726298@news.sunsite.dk...
On 05-01-2011 15:54, Tom Anderson wrote:
On Tue, 4 Jan 2011, Mike Schilling wrote:
"Peter Duniho" <NpOeStPeAdM@NnOwSlPiAnMk.com> wrote in message
news:V7CdnfTQh865Tb7QnZ2dnUVZ_tSdnZ2d@posted.palinacquisition...
Even Java has at least one place I know of where the JDK API requires
you to pass an array so that the method can return more than one
value and do so without allocating a new object each call.
It would be neater (IMHO) for InputStream.get() to be defined
boolean get(out char c)
than
int get()
with a special return value that means "there wasn't one".
Even better:
byte get() throws EndOfFileException
Although i know that many would not agree with me on that.
It is a nicer API.
Not if every loop requires a catch block, it isn't.
You should handle IOException anyway.
If EndOfFileException were indeed exceptional, then I could
not see the problem.
Arne