[889] in java-interest
Re: Operator precedence
daemon@ATHENA.MIT.EDU (Scott Hudson)
Mon Aug 14 03:15:49 1995
From: hudson@cc.gatech.edu (Scott Hudson)
To: java-interest@java.sun.com
Date: Sun, 13 Aug 1995 23:20:15 -0400 (EDT)
Cc: paulp@CERF.NET
Paul Phillips <paulp@CERF.NET> writes:
> Given that Java seems to do a pretty good job of "cutting the cord" to
> C/C++, was any thought given to fixing the mess of precedence levels in
> C? I haven't seen anything in the documentation that states C precedence
> levels apply, but it seems implied (with the >>> operator at >> level?)
Could you be more specific about what you think is wrong with the C levels?
Could be I'm just used to them, but they seem to me fairly well thought out.
For example, if you start removing levels, will "x = a < b && c < d || e < f"
do what you would expect (it doesn't for example in Pascal).
The spec does list precedence order and it does match C. The spec,
however, does not mention cast and new operations, and its recently
been stated that new has higher precedence in Java than in C++ (in Java
it is apparently higher than "." or "[]").
Scott
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com