Slashdot Mirror


Preview of Java 1.5

gafter writes "An early access prototype implementation of the proposed new J2SE 1.5 language features is available. The prototype includes generics (JSR 14), typesafe enums, varargs, autoboxing, foreach loops, and static import (JSR 201). In other words, all the new language features planned for 1.5 except metadata (JSR 175). The prototype includes full sources for the compiler, written in the extended language. You can download the prototype from java.sun.com. It requires J2SE 1.4.1 and provides some examples of how to use the new language constructs. The prototype includes an experimental type system (variant type parameters) for Generic Java that is being considered for Tiger (1.5) based on a paper by Igarashi and Viroli at ECOOP 2002 . Comments and votes for the new type system are being gathered at bugParade."

35 of 461 comments (clear)

  1. good and bad ...? by bubzer · · Score: 4, Interesting

    Some of these things are certainly nice (typesafe enums...) - but wouldn't it be nice to try and keep the java language *simple*? There are iterators for doing stuff like foreach-looping ... varargs? Why? It is an object-oriented language - take use of that polymorphism!

    1. Re:good and bad ...? by IO+ERROR · · Score: 4, Funny
      varargs? Why?


      Because no language is complete without printf.


      Anyway, I'm glad to see Java finally getting generics. This will make it a little easier to manage very large projects in Java. The only problem I see is that generic java usually sucks compared to the brand-name stuff (e.g. Lavazza).

      --
      How am I supposed to fit a pithy, relevant quote into 120 characters?
    2. Re:good and bad ...? by bramez · · Score: 5, Informative
      but wouldn't it be nice to try and keep the java language *simple*?

      isn't syntactic sugaring all about making code more readable? I think boxing , generics, typesafe enums, static imports make the java language more simple to use.

      It's just looking over the fence to the "sibling" languages (c++, c#) and copy what they do better.

    3. Re:good and bad ...? by Anonymous Coward · · Score: 5, Insightful

      There certainly is a tradeoff: If a language gives too many options to do one thing, it becomes confusing. A programmer usually develops a certain coding style. She prefers certain constructs over others. When you read code, you have to adjust to the style of the programmer who wrote the code, and possibly recognize constructs which you're unfamiliar with because they're not part of your coding style. Take the proposed for-loop extension as an example. Every Java programmer instantly recognizes the head of an "iterator for-loop". It's an idiom. The proposal adds syntactical sugar to supposedly help identifying this very frequently encountered situation, but it does the exact opposite: There are now two ways of looping over an iterator, and you have to be familiar with both if you want to quickly understand other people's code. If you want a good real-world example of what too much syntactical sugar does to a language, take a look at some Perl programs.

    4. Re:good and bad ...? by Daleks · · Score: 4, Insightful

      Some of these things are certainly nice (typesafe enums...) - but wouldn't it be nice to try and keep the java language *simple*?

      Type-safe enums were added to eliminate previously verbose and obfuscated code. It simplifies the code without complicating the language.

      There are iterators for doing stuff like foreach-looping ... varargs? Why? It is an object-oriented language - take use of that polymorphism!

      What does polymorphism have to do with an enhanced the for-loop or variable arity functions? The enhanced for-loop ensures that collections are properly iterated across (no out of bounds exceptions). You honestly think that

      for (int i = 0; i < C.length; ++i) {/* ... */}

      is more complex than

      for (int i : C) {/* ... */}?

      Also look at what you can do with variable arity functions. Say you have a constructor for a collection class and you want to be able to initialize a variable number of default values. Well, now you can. Apple's Cocoa (Foundation) library uses this to allow easy construction of NSDictionary objects.


      id d = [NSDictionary dictionaryWithObjectsAndKeys:@"foo", @"bar", @"biz, @"baz"];


      The other way to do it would have been


      id d = [[NSMutableDictionary alloc] init];
      [d setObject:@"foo" forKey:@"bar"];
      [d setObject:@"biz" forKey:@"baz"];


      Aside from Cocoa's long parameter naming scheme, the first method is a shorter and a lot easier. It also uses fewer messages.

  2. No subject. by Daleks · · Score: 5, Funny

    ! But, . And finally, .

    Just had to get that trolling out of the way. Now let the educated and well-formulated arguments begin.

  3. Sounds like what C# has that makes it better... by Anonymous Coward · · Score: 4, Interesting

    Surprisingly (!!!) all the things C# had (or will have - generics) that made it superior. This is going to be fun seeing these two compete. So far I am on the C# side but who knows :) this is really fun.

  4. Simplicity lost by abies · · Score: 5, Interesting

    While, as a java developer, I'm looking forward to most of these changes, I'm a bit afraid that java may lose it's positions as simple OO language which can be used for teaching in schools. Java was originally built with idea that you can read every java program in the world without problems. A lot of expresive power was sacrificed because of that - most notable preprocessor (to avoid people designing their own 'languages' for each project and library, as it is done in C).
    Anonymous inner classes was first major ugliness which came into language - not very clear, hard to explain to a newcomer. But with all these new proposals, significant complexity is added to code in terms of visual overview. This is not critical for developers - perl hackers are faring very well, despite of having language 10 times as complicated as java as far as syntax is concerned - but pure-OO, java-is-new-pascal-for-algorithms academic society will probably start looking for a new language soon... (ok, maybe not really 'academic', I'm thinking more about secondary-level school programming basics).

    1. Re:Simplicity lost by girl_geek_antinomy · · Score: 4, Insightful

      It's interesting that you say that about teaching, and I think you have a point. I'm a CS student at Cambridge University (currently avoiding finals revision) where Java is the fundamental teaching programming language, the one they teach you right up front, the examples language for code fragments in algorithms situations (well, along with ML) etc.

      Actually though I think for this kind of teaching you can just use the simple subset of Java that's been about since 1.1 - after all, you're teaching principles of programming and OO - you can teach actual Java *development* down the line and cover the complexities, bells, whistles and dongles then...

  5. Interested in learning more about these generics by smittyoneeach · · Score: 4, Interesting

    You could troll and say that Java has finally caught up with where C++ was better than a decade ago.
    More constructively, maybe the implementation will improve on things from all that time and experience.
    Java is the best defense against the .Net onslaught. Good luck, Java.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  6. Re:I'll care when native compilers become the norm by 73939133 · · Score: 5, Insightful

    Java can walk on water and I'm still not going to use it to develop anything I expect anyone to use. Give me a native optimizing compiler and I just might reconsider.

    You mean like GNU gcj?

    For languages that are intended for general purpose use and especially for situations where performance/efficiency is important they're just a BAD idea.

    You seem to think that by compiling stuff to native code things magically run fast when the problems are actually library design, class loader design, bad memory management, and other issues. Java's JIT is about as fast as natively compiled C code and Java's lousy performance is living proof for the fact that making a great native code compiler is not sufficient for getting good performance.

    Python and Perl programs often run rings around equivalent Java programs in terms of actual, end-user visible performance and memory usage, despite being interpreted. If anything, the compromises people need to make to make languages easily compilable into native code make it much harder to build efficient systems in them.

    Of course, it's not like we needed any more proof of that: the inefficiency and bloat of systems like Windows, Gnome, and KDE demonstrate the same point, as did several generations of systems before them. And generation after generation of programmers repeats the same mistake you are making.

  7. Re:I'll care when native compilers become the norm by afidel · · Score: 4, Informative

    Native compilers have been available forever but they rarely gain you enough over JIT to justify the lack of crossplatform portability. If you are running a J2EE app as middleware for a huge ecomerce or CRM system, etc then sure recompile to native code, but for other things it doesn't make sense when the JIT compilers are 99% effective. The biggest thing slowing JAVA down is the lack of a decent GUI framework.

    --
    There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
  8. Re:I'll care when native compilers become the norm by abies · · Score: 5, Informative

    I'm surprised to see that there are still people out there which use 'interpreter' argument...

    Anyway, there is a plenty of native compilers for java. I'm not sure if you have heard about certain compiler from free software group called Antilope or something like this - I think it is called gcc. They have a frontend for java, gcj, which compiles java source/bytecode to same intermediate stage as other compilers, thus sharing optimizing backed. If you don't care about paying few bucks, JET is very good compiler, written specifically for java, supporting 1.4.1. There is also few others, but I can tell only about these two from my experience.

    Both these compilers are available for few years now. Problem is not with lack of native compilers, or performance of java in mixed mode offerred by Sun hotspot - problem is with mindset of poster. If you are not willing to use java - no problem. But please say it is 'religious' - everybody will agree with you, as you can have any beliefs you want. But do not try to back up religious statements with fake arguments.

  9. Generic Java by Darkforge · · Score: 4, Informative
    If you, like me, didn't know much about generics, the best place to go to read up more is the specification off of which JSR 14 was based: GJ: Generic Java. Don't bother with the FAQ though... it seems to be mostly empty.

    (Excuse my whoring, but Sun's link to GJ was 404.)

    --

    When I moderate, I only use "-1, Overrated". That way, I never get meta-moderated!

  10. Re:Sounds like what C# has that makes it better... by Jugalator · · Score: 4, Insightful

    Yes, I noticed this as well. I found it pretty interesting, and it reminded me of the old IE/Netscape browser wars. One implements the new features of the other. Let's just hope they don't get too carried away and bloat the language. :-/

    To me, Java was a lanaguage with a minimum of "redundant" features. You can write a "for" loop without using "foreach". You can use a class instead of a struct. And so on... I'm actually a bit surprised that Sun are throwing in features the language doesn't really always seem to need. I thought that was C#'s area. :-)

    --
    Beware: In C++, your friends can see your privates!
  11. Generics by The+Bungi · · Score: 4, Interesting
    There's an apropos article over at kuro5hin. Well written, I think.

    It seems to me that languages like Java and C# really don't need them.

    1. Re:Generics by be-fan · · Score: 4, Interesting

      One thing I never understand about anti-C++ rants. Where's the beef? All I see is a whole bunch of hand waving and vague references to pseudo object orientation, incoherency, etc. No real meat at all. So from my point of view, some real evidence:

      1) C++ is a systems programming language. The lack of pointers would make it entirely unsuitable for that purpose. For normal use, you should use references or smart pointers. Not doing so is no excuse. Using a C-style array when you don't need it is akin to deliberately writing an infinite loop. It's entirely the programmer's fault.

      2) The object model doesn't lack anything that Java's model has, except introspection (which is fragile at best). If anything, Java's model is equally broken, because everything is not an object. What exactly about the object model is missing?

      3) What's wrong with the C++ syntax? How is it that different from Java's syntax?

      From my POV, peoples' biggest problem with C++ is that it doesn't prevent you from hurting yourself. That's okay. I hate all the consumer protection bullshit, and Nader and his "don't run with scissors" party, so I have no problem with my language having some teeth. I do a lot of low level programming, and I find that C++, more than any other language, allows one to do that will still maintaining a high level of abstraction.

      --
      A deep unwavering belief is a sure sign you're missing something...
  12. Is the single instance of VM in? by Kjella · · Score: 5, Interesting

    ...because there's nothing like running a 2kb calculator and a 2kb notepad and both have them run on separate 10-15mb VMs. That is a real drag for any non-monolithic use of Java (yes I do know of servlets etc.)

    Kjella

    --
    Live today, because you never know what tomorrow brings
  13. Re:I'll care when native compilers become the norm by spongman · · Score: 4, Informative
    Give me a native optimizing compiler and I just might reconsider.
    hotspot is a native optimizing (JIT) compiler. It takes Java bytecode as its input and generates optimized native code. Try disassembling some of the code it generates some time, it does a remarkably good job.
  14. Teach the kids Scheme or Smalltalk. by BitwizeGHC · · Score: 4, Insightful

    Those two languages are far simpler, and let you really hammer the points about programming down without getting the kids confused about syntax rules.

    Smalltalk has, essentially, only one operation: the message send. Send object X a message Y, and get Z back as a result. Even simple things like addition are implemented this way. While not blazingly fast (except in certain specialized implementations), the message-send semantic is surprisingly efficient: many complex real-world systems have been constructed using Smalltalk.

    Scheme also enjoys the advantage of being small and simple, yet powerful. You don't need to know what the lambda calculus is to see how effective and intuitive Scheme's procedural semantics is. ("Lather, rinse, repeat." See? Tail recursion. It was there all along.)

    Either way, it's better to use a simple language to teach students how to formulate plans for doing things (i.e., algorithms), and then hit them with fanciful syntax later rather than drop them into a popular, but bewildering for newcomers, language (which I consider C++ and Java to be).

    --
    N4st0r, trixx0r h0bb1tz0rz! Th3y st0l3 0ur pr3c10uzz!
  15. The problem: Improving programmer productivity by BjornStabell · · Score: 5, Interesting

    These additions seems to put Java on par with C#, but to make a quantum leap in expressiveness you need a dynamically typed scripting language.

    Most applications these days can be written in higher-level languages, resulting in 5-10 times less source code compared to Java/C#, and making them correspondingly simpler to code and maintain.

    Java doesn't really have a kick-ass companion scripting language. In MS world, VB plays this role. VB is really popular, but (I think most people would agree) a crap language and not really that high level. JavaScript just doesn't seem to cut it (pretty much only used in browsers).

    Why doesn't Sun take a hint and phase JavaScript out in favor of a powerful multi-purpose high-level language like Python or Ruby? That'll put them miles ahead of Microsoft in terms of increasing programmers' productivity... and programmers' quality of life.

    1. Re:The problem: Improving programmer productivity by MSTCrow5429 · · Score: 5, Informative

      JavaScript has nothing to do with Java, other than their similiar names. JavaScript, originally LiveScript, "was renamed by Netscape marketers who licenced the name to ride Java's Buzz" (Wired, July 2002, pg. 61). Javascript is actually an offshoot that sprung from both C++ and ANSI C (C89). JScript and ECMA Script sprung from Javascript.

      --
      Slashdot: Playing Favorites Since 1997
    2. Re:The problem: Improving programmer productivity by DdJ · · Score: 4, Informative
      Java doesn't really have a kick-ass companion scripting language.
      Have you looked at BeanShell? I haven't started using it yet, but it looks like it has the potential to really empower scripting.
  16. Re:I doubt that Java will succeed. by Billly+Gates · · Score: 4, Insightful
    Go do a job search on monster.com and count the java vs C++ programming?

    Java is growing. Its not horribly complicated and buggy like MFC and the win32api and your not locked in with .net.

    Corporations use Java for servlets and they use if for the built in libraries, low cost and portability.

    Java is a great language and I am sick and tired of legalists complaining about it. First the LISP academics complained about Unix or anything non lisp. THe unix haters manual was a result of this. It went nowhere. Now we have smalltalk and Eifel purest who claim that everything else is inferior.

    Your little world may be great in University teachings but in the real world they lack functionality and libraries to accomplish real world bussiness tasks.

    Mono is very alpha and lacks many of the winform libraries that are mature on Windows. If you use it your asking for vendor lockin eventually which is Microsoft's goals. Look at the hasle SCO has made in the corporate world in regards to Linux? If Microsoft begins taking a similiar approach and everyone uses Mono then they are SOL. Its all Windows lockin. The microsoft version will always be better and more supported so your PHB's have a great argument to switch to Windows.

    I chose to live in the real world and use what everyone else is using and that is java.

  17. Re:Java is passe by 73939133 · · Score: 4, Insightful

    Other API's are NOT standardized and are in full control of Microsoft [...] I think that mono will have some major problems in the future. Sure they can implement C# and CLR, but they virtually have to reengineer all other API's, because there are no formal specs available.

    How is that different from C++ and the Win32 APIs? The fact that Microsoft controls the Win32 APIs doesn't matter to me when programming in C++--I just write my code in Gtk+ or wxWindows. Likewise, the fact that Microsoft controls the .NET APIs doesn't matter to me when programming in C#--I can just use Gtk#.

    Furthermore, you don't need Sun-style central control over everything in order to get good cross-platform toolkits, as toolkits like Qt, FLTK, and wxWindows show. C# will have good cross platform support, either by successfully cloning .NET, or by binding to an existing cross-platform toolkit, or by creating a new cross-platform toolkit just for C#.

    You see, the fact that C# doesn't come with philosophical baggage like WORA and "100% purity" is an advantage as far as I'm concerned. What WORA and "100% purity" has brought us is lousy implementations of Java on Linux, and APIs that don't even let me access environment variables.

  18. Java Vs .net by tonywestonuk · · Score: 4, Insightful

    To be quite honest, I dont care at all if .net is better than Java. The point is that .net is controlled by Microsoft, and currently only runs (officially) on M$ products. Mono might be outlawed by Microsoft at any point. You are at their mercy.

    The ONLY reason that Sun hasn't relinquished control of Java, is that if they had done so, Microsoft would have been free to embrace/extend/ corner the market.... The same as what they did with Internet explorer.

    So, how many non-geeks use anything but, or even know of anything but IE?

    Businesses would standardise on MS java, and java on any other platform would become unuseable.. (just as there are web pages that are only useable in IE).

    By stating "I'm using C# over Java" you are selling you sole to the devil...You wait till microsoft start extending DRM into the specification, therby relegating projects like Mono to the sidewalk, at this point it will be M$ .net, or nothing. Do not think this will not happen.

    So, Its your choice. Choose to go with the, arguabily faster/easier to code offering by our (sarcasm) good friends at Redmond, or choose to fight Microsoft by writing code that will run on all platforms from mobile phones to IBM mainframes. Believe me when I say we will all be better off in the long run.

    1. Re:Java Vs .net by Billly+Gates · · Score: 4, Interesting
      Speaking of mercy and fud responses from the pro .net/mono crowd you can always mention the SCO effect. Corporations obsses with legal costs and potential lawsuits. Company Image is not something that is easy to get back if its hurt. This is important when picking a solution

      Most major corporations who are planning on moving to Linux if they have not done so are cancelling and puting their plans on hold thanks to SCO.

      If you use mono at work assuming its mature enough and ms pulls a sco you can kiss your linux workstation goodbye.

      According to MS halloween documents, legal fud got a negative response form %80 of all bussinesses.

  19. Re:Too litttle, too late. by Call+Me+Black+Cloud · · Score: 4, Informative

    I believe one of the things Sun tried to get at was to make Java development easier. It's something they're working on across the board, as this article notes.

    Without seeing (in the Java source code) how the templates are implemented I can't say that I agree or disagree with your statement that they will be inefficient, though I'm inclined to disagree based on your example. Templates or not, objects are going to be stored the same way. The difference is how those objects are retrieved. Right now you have to cast everything coming out of an ArrayList (unless the Object reference is sufficient)...not only is that being moved to the language but you also gain compile-time type checking. That will only serve to reduce errors and make the software more reliable. Templates are optional anyway - you don't have to use them. I'm looking forward to them.

    I don't think you're ever going to see VM sharing. If applications can share VMs then one rogue app could bring down other apps by trashing the VM (never supposed to happen) or by poor thread management.

    Either way you look at it, it's a good year to finally be going to JavaOne...

  20. Re:I doubt that Java will succeed. by oops · · Score: 4, Insightful

    Wake up! When it comes to delivering enterprise solutions (I work mainly in the financial industry) then Java is the primary choice currently. I'm not (necessarily) defending the language, but as a consultant I wouldn't have the same choice of work specialising in any other language.

    That may change over the coming years with .Net, but the current 'standard' is Java. Like it or lump it.

  21. Re:Too litttle, too late. by mrright · · Score: 5, Informative

    "Without seeing (in the Java source code) how the templates are implemented I can't say that I agree or disagree with your statement that they will be inefficient, though I'm inclined to disagree based on your example."

    Slashcode swallowed some brackets even though I was in text mode :-(

    What I mean is the following: If you create for example an ArrayList of ints, the most efficient way to store these ints internally would obviously be an int[] and not an Object[]. But even though java uses templates, it still stores primitive types such as int in an Object[], so there is a huge temporary object creation overhead. Whenever you store an int in your IntArrayList, a new Integer object is created on the heap and an old Integer object has to be garbage collected. In .NET you just store a 32bit value in an array, which is a single operation on most processors.

    The .NET templates will create a different class for each primitive type, so that primitive types will indeed be stored in their corresponding primitive arrays without creating objects on the heap. For classes, the .NET implementation behaves similar to the java implementation: There is only one internal class created for all reference types.

    "Templates or not, objects are going to be stored the same way. The difference is how those objects are retrieved. Right now you have to cast everything coming out of an ArrayList (unless the Object reference is sufficient)...not only is that being moved to the language but you also gain compile-time type checking. That will only serve to reduce errors and make the software more reliable. Templates are optional anyway - you don't have to use them. I'm looking forward to them."

    Me too. It is not that I dislike the new features. I just think that they could have been implemented better, faster and earlier.

    "I don't think you're ever going to see VM sharing. If applications can share VMs then one rogue app could bring down other apps by trashing the VM (never supposed to happen) or by poor thread management."

    VM sharing does not mean that all java programs must run in one process. But for most desktop applications this would make a lot of sense. You are right about the thread management, but you could always restrict the number of threads an application can create. Just have a nice XML file which describes how much resources each application may allocate. That is the way .NET does it, by the way.

    If sun will not do VM sharing, you will never see decent client applications written in java. Just think about it: for each java application you start, the whole swing library has to be JIT-Compiled anew. What a huge waste of processing power!

    --
    Private property is the central institution of a free society (David Friedman)
  22. More Wrong Choices by ChaoticCoyote · · Score: 4, Interesting

    I program Java for several customers, from scientific to business apllications.

    Autoboxing is yet another way of hiding overhead; the wrapper classes still exist, but are now a big "secret" masked by autoboxing.

    Why add autoboxing to make containers look more "natural with POD types, then ignore the crying need to operator overloading in scientific and engineering applications? Why one piece of syntactic sugar as opposed to another?

    Overall, I'm not terribly impressed. The new generics seem weak; I don't see an emphasis on fixing bugs, stability, or independent standardization. Much as I like Java, 1.5 does not address most of my needs.

  23. Why a Large Bank Junked Java by anonymous+cupboard · · Score: 4, Informative
    We see yet another evoloution of Java, another run-time-environemnt, each of which is subtly incompatible with the rest.

    I am working with a large bank at the moment, one of the largest in the world and they have largely junked Java, except for running browser applets.

    They liked Java, the class libraries were great but, sorry, it is too slow. I'm not talking about incompetent coders. They even had Sun in looking at some of the apps. The end result was a customised virtual machine - but it was still too slow and the incompatibilities were a killer. The VM had to work identically across the bank's generations of systems from different vendors. One gotcha, IIRC, was synchronisation, making it difficult to run a JVM across processors and to exploit them properly for performance.

    End result was a switch back to C++ for back end apps. Java could still be used but only for non-critical front-end stuff. The bank may consider C#, but it seems that Java has had its day.

    Maybe this sounds like a troll, but Sun should release their control of the Standard. This will slow things down, think how long it takes to get stuff into C++, but that stability gives everyone room to think as to whether a change is really necessary.

    I don't like the idea of C# but at least MS handed it over to ECMA.

  24. Everyone's bashing java by Julian+Morrison · · Score: 4, Insightful

    ...for getting less simple, but it was never simple to begin with. Simple would be to use weak-vars-strong-values typing like python. Making everything an Object and using that plus typecasts to do generics is not "simple", it's a hack. It uglifies your code, makes it less efficient, and (ironically) breaks strong typing.

    Generics are also a hack, but at least they are an overt, clean one.

  25. Java is pragmatism over principals by ggruschow · · Score: 5, Insightful
    So many of the posters here are missing the best reasons to use Java today. Java is highly pragmatic. It's a good, broad set of tools that's widely understood and supported, and often improved.

    Java rarely wins in any particular niche. Relatively simple GUIs and COM objects are owned by VB (and Delphi). C++, C, and assembly rule in performance. Perl rules text processing. Python rules in ease of reading. ANSI C, Perl, Python may be more portable. Smalltalk, Eiffel, Lisp, Ruby, ML, Haskel, Forth, and a variety of others are a lot more true to a pure language concept. However, Java does an adequate job in most cases, and when you start crossing boundaries, it'll often be easier to do so in Java-land.

    Java isn't innovative. However, it's constantly being improved. Sure, things like JDBC, Collections, SWING, NIO (async I/O), generics, threads, and concurrent garbage collection were available in some form elsewhere previously. They're all packaged into nice, free, portable, well documented, easy to use parts of Java though, and I'm happy to have them.

    Java isn't as free as Emacs. However, it's mostly free as in beer, and it doesn't force it's freedom on you. It's certainly a whole lot freer than most things from Redmond. I admit, I don't care if a language is handled by a standards body, unless the company in question holds other monopolies it can abuse. I seriously don't think Sun is going to do anything so wacky as polluting the language to make COM (*cough* MS) or Object Pascal integration (*cough* Borland) easier.

    Java's support base and (free) developer tools are just plain great. I love Eclipse, and IDEA and recent JBuilders are pretty nice too. VS.NET is good stuff as well, but contenders like Python are sorely lacking in this arena.

    I still write plenty in other languages, but every year the percentage I write in Java goes up.. They keep filling holes (soft references, regexes, async I/O, .1s GC pauses) that were keeping me out of Java. I'm happy to see some more syntatic sugar in Java.. The things they're addressing will make a whole lot of code more readable.

  26. Re:I'll care when native compilers become the norm by Glock27 · · Score: 4, Interesting
    Buuuuzzzzzz! Wrong! Nu-uh!

    That is impossible. Java has to do the same as the C code, plus the extra overhead of doing the JIT. There is no way Java can be "as fast".

    Ah, the "impossible" word. ;-)

    You're presuming that the ahead-of-time compiler can "know" everything that the JITC can. That isn't true, in many common cases.

    Another point regarding JITC compilation is that it can be for the exact target processor, something not typically the case for traditionally compiled programs.

    All that said, current JVM performance certainly varies between 'better than C++' and 'worse than C++', with pathological cases in both directions.

    The current 1.4 JVMs actually took a hit on some math operations, though that is supposed to be fixed in 1.5.

    I hope gcj gets to the point where it supports the latest language spec. The libraries are tougher, and many of them aren't needed for interesting projects. For certain applications, an ahead-of-time compiler is nice.

    By the way, for a good example of a 'fast' Java program, check out Eclipse from www.eclipse.org.

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait