[667] in java-interest
Re: Java compiler is trying too hard for me
daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Wed Jul 12 17:38:36 1995
Date: Wed, 12 Jul 1995 13:21:57 -0800 (PDT)
From: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
Reply-To: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
To: Tientien Li <li@deming.Jpl.Nasa.Gov>
Cc: java-interest@java.Eng.Sun.COM
Hi Tientien,
> If the goal is to enforce the initialization of local variables, then why
> not check this at the declaration time then at the time variables are used?
> It is probably much easier to tell me:
>
> int x;
> ^ error
>
> instead of tracking all possible references of x, then tell me:
>
> System.out.println( x );
Sometimes you would initialize it anyway, for example:
int x;
if (...) {
x = 3;
} else {
x = 5;
}
System.out.println("x = " + x);
Initializing x in this case would be a waste of time.
Have fun,
Arthur van Hoff
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com