On Thu, 14 Oct 2010 20:10:52 +0200, Philipp Überbacher wrote > > I'm not experienced in any language but I've dabbled with a few, and > imho java and how it's taught here is far too complicated or rather > distracting. > > The first thing newbies see, before hello world, is a beast like > eclipse, which alone causes a whole bunch of problems. Then they have > to mess with packages, and classes, and objects, although they teach > it here by saying "take this as given, ignore it for now". The next thing > they see are some funky classes that allow proper input/output > because java doesn't seem to have that. Only then they get to start programing > and can deal with javas built in funkyness. But that's not the language, that's the quality of the people teaching it there. > What does the following example evaluate to? > 1.2+3+"||"+3+2.1 $ 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 > even get to programing, so I don't think it's a good teaching language > (for total beginners at least). 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. > > _______________________________________________ > Linux-audio-user mailing list > Linux-audio-user@xxxxxxxxxxxxxxxxxxxx > http://lists.linuxaudio.org/listinfo/linux-audio-user -- R. Mattes -- Systemeinheitsstreichler Hochschule fuer Musik Freiburg rm@xxxxxxxxxxxxxxxxxx _______________________________________________ Linux-audio-user mailing list Linux-audio-user@xxxxxxxxxxxxxxxxxxxx http://lists.linuxaudio.org/listinfo/linux-audio-user