[674] in java-interest
Re: Java compiler is trying too hard for me
daemon@ATHENA.MIT.EDU (Michael Lorton)
Wed Jul 12 20:35:39 1995
Date: Wed, 12 Jul 1995 16:19:51 -0700
From: Michael Lorton <mlorton@eshop.com>
To: java-interest@java.sun.com
In-Reply-To: Tientien Li's message of Wed, 12 Jul 1995 10:49:14 -0700 <9507121749.AA01481@deming.>
> OK, I agree with you its a good idea to initialize variables.
I disagree. In the original situation, where one of several possible
initial values might be the correct one, the correct thing to do is what
Mr. Li did originally: leave it uninitialized until you know what to do.
It saves resources and avoids masking the failure to set the variable
correctly.
Unfortunately, a bug in the compiler prevented that, but
initialization was cheap, and you can check the code by hand.
Mr. Li's other point was correct: there are many cases where the
compiler cannot check for initialization.
M.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com