On Thu, 14 Oct 2010 20:10:52 +0200, Philipp Überbacher wrote
But that's not the language, that's the quality of the people teaching it
there.
> What does the following example evaluate to?
$ cat > Foo.ava
class Foo
{
static { System.out.println( 1.2+3+"||"+3+2.1 ); System.exit( 0 ); }
}
^D
$ javac Foo.java
$ java Foo
C'm on, that's not really that hard, no Eclipse, no packages, no real object.
> I think there's far too much distracting mess to sort out before you
What's distracting here?
Regarding your example -my main question would be: what do _you_ expect from that
code. 'I'd say you get what you ask for.
Java has a defined evaluation order (JLS 15.7) - left to right, and does type
conversion
_and_ does overloading of methods. All of this are basic design decisions
which any language
has to take. Are you criticising the choices the Java team made? Do you prefer
the Ocaml way?
So "1 + 2", or "3.0 +. 2.1" - and then the horrible "add_int_to_float 1 +
2.0" ????
That for shure will be less confusing to beginners :-/
BTW,
1] 1.2 + 3 = 4.2 since you can't convert a float to an int but an int to a
float
2] 4.2 + "||" need to convert 4.2 to a string, because the other way
round isn't supported
3] ... go on ...
Cheers, RalfD
P.S.: if possible i try to avoid programming in Java, but for totally
different reasons.
>
--
R. Mattes -- Systemeinheitsstreichler
Hochschule fuer Musik Freiburg
rm@inm.mh-freiburg.de
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.