[3831] in java-interest

home help back first fref pref prev next nref lref last post

Order of evaluation and determinism

daemon@ATHENA.MIT.EDU (Jeremy Fitzhardinge)
Wed Nov 29 03:55:47 1995

From: "Jeremy Fitzhardinge" <jeremy@suede.sw.oz.au>
Date: Wed, 29 Nov 1995 18:12:48 -0500
To: java-interest@java.sun.com

Hi all,

In the preface to the 1.0BETA spec, it says that it is intended that
all language constructs are fully defined so that all Java programs
will behave the same way on all implementations.  This seems like a
very ambitious goal.

Anyway, I'm wondering about the case of order of evaluation of
expressions and the effects of their side-effects.  Does Java have a
notion similar to C's "sequence points", and the corresponding
limitations of modifying a variable twice between them?

I hate to bring it up, but what does
	a = foo(i++) + bar(i++);
mean (if anything), or indeed
	a = i++ + i++; ?

What if the side-effects happen within methods which the compiler can't
see?

Thanks,
	J
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post