Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Java Google Oracle Programming Apache

The Coming War Over the Future of Java 583

snydeq writes "Fatal Exception's Neil McAllister writes about what could be the end of the Java Community Process as we know it. With the Apache Software Foundation declaring war on Oracle over Java, the next likely step would be a vote of no confidence in the JCP, which, if the ASF can convince enough members to follow suit, 'could effectively unravel the Java community as a whole,' McAllister writes, with educators, academics, and researchers having little incentive to remain loyal to an Oracle-controlled platform. 'Independent developers could face the toughest decisions of all. Even if the JCP dissolves, many developers will be left with few alternatives,' with .Net offering little advantage, and Perl, Python, and Ruby unable to match Java's performance. The dark horse? Google Go — a language Google might just fast-track in light of its patent suit with Oracle over Android." Reader Revorm adds related news that Oracle and Apple have announced the OpenJDK project for OS X.
This discussion has been archived. No new comments can be posted.

The Coming War Over the Future of Java

Comments Filter:
  • Where is IBM? (Score:5, Insightful)

    by rvw ( 755107 ) on Friday November 12, 2010 @11:23AM (#34206790)

    They are the one and only company that can pull this thing straight. They have the money, they have proven their commitment to OSS, so I sincerely hope they step in and fix this. It's too important to let Oracle mess everything up.

  • Alternatives (Score:4, Insightful)

    by Massacrifice ( 249974 ) on Friday November 12, 2010 @11:32AM (#34206888)

    It's too bad that some of the most promising new languages (Scala, Clojure) are JDK based. What we need is a modern lingua-de-franca, a language that's structured enough, with modern features, a good standard library, and that doesnt take 10 years to master. Go is still proprietary shite that will bite you after Google turns evil (and you know they will). Havent looked at D yet. Erlang maybe?

    Is there any high-level, easy language today that's not threathened somewhow by f%^&%ng patents from the big guys?

  • Re:C# (Score:5, Insightful)

    by Anonymous Coward on Friday November 12, 2010 @11:34AM (#34206894)

    With Microsofts history over the past 20 years, I'd say they won't pull any strange tricks until enough people have adapted it and are locked in, then they will suddenly have a change of heart. It's only Microsofts kind heart that keeps C# and Mono open enough, not *anything* legally binding.

  • by dclozier ( 1002772 ) on Friday November 12, 2010 @11:35AM (#34206910)

    Really? As competition to Java it is fairly comparable. It has some features that, used improperly will lead to slower code (though, they are nice as a convenience), it is missing some features, has some features that Java is missing, and the free version of Visual Studios, at least in my opinion, is a nicer IDE than Eclipse, Netbeans or Anjuta. And it's not being used in a bunch of lawsuits by it's owner.

    Yet...

  • by Mongoose Disciple ( 722373 ) on Friday November 12, 2010 @11:46AM (#34207062)

    I fail to see why folks couldn't find a way to fork Java.

    In this case, I think it's an important to draw a distinction: there's really no reason why you couldn't, except that Oracle will attempt to (right or wrong, and probably wrong) sue whoever tries into bankruptcy.

    They'll be able to put a good enough case together that won't initially appear frivolous, even if it would ultimately be doomed to failure with good legal representation, and lawyers aren't generally free.

  • Re:C# (Score:5, Insightful)

    by Raenex ( 947668 ) on Friday November 12, 2010 @11:50AM (#34207122)

    Maybe I'm being naive, but right now C# looks fairly tempting.

    Yes, you are incredibly naive. People are looking to flee Java because of the greedy and proprietary corporation behind it, Oracle, and you think they should run into the arms of Microsoft? Get a clue.

  • by Barefoot Monkey ( 1657313 ) on Friday November 12, 2010 @11:51AM (#34207132)

    The open source weak spot has always been the infighting, eventual lawsuits, splitting and renaming, remember that old saying about too many cooks in the kitchen?

    Exactly the same as with closed source, for exactly the same reasons.

  • Re:Alternatives (Score:5, Insightful)

    by characterZer0 ( 138196 ) on Friday November 12, 2010 @11:52AM (#34207146)

    We do not need a language-de-franca. We need a virtual-machine-de-franca. Everybody seemed to think that the JVM was it.

  • Re:Alternatives? (Score:3, Insightful)

    by butlerm ( 3112 ) on Friday November 12, 2010 @12:00PM (#34207236)

    Apache, not Sun or Oracle or IBM is the big name in Java.

    Apparently, Apache needs to start applying for defensive patents, or it is not going to be the big name in anything.

  • Re:C# (Score:3, Insightful)

    by Anonymous Coward on Friday November 12, 2010 @12:02PM (#34207252)

    Congratulations, you have proven parent poster's point.

  • Re:C# (Score:5, Insightful)

    by gmuslera ( 3436 ) on Friday November 12, 2010 @12:02PM (#34207258) Homepage Journal
    So, as the actual problem with java is the corporation that "owns" it decided to misbehave, you propose to switch to another language, from another corporation, for which misbehavig is their way of life?
  • Performance my A** (Score:4, Insightful)

    by Herkum01 ( 592704 ) on Friday November 12, 2010 @12:05PM (#34207284)

    Perl, Python, and Ruby unable to match Java's performance

    I don't know about Ruby, but Perl has damn good performance, such that it still runs a number of major web sites, including this one. The ONLY reason Java is as popular is because Corporate America loves a corporate solution and Java was being sold as a solution by major vendors(think IBM, Sun and for a while Microsoft).

    You cannot really sell Perl, or Python, or Ruby as a corporate solution because they cannot hijack a version, edit it and claim it is special. Hell, Perl runs on EVERYTHING what more can IBM add to it? This is really why good open source languages are neglected by large companies, they cannot charge anything for it.

  • Re:Where is IBM? (Score:5, Insightful)

    by mcvos ( 645701 ) on Friday November 12, 2010 @12:11PM (#34207350)

    Not trolling, but is Java really worth the fight at this point? Years ago it had the promise of the 'programming panacea' but now it's just another programming language.

    It's not about the language, it's about the platform. The JVM, and Dalvik's status in that respect.

  • Re:C# (Score:5, Insightful)

    by mcvos ( 645701 ) on Friday November 12, 2010 @12:15PM (#34207398)

    For this specific kind of thing, Microsoft has never been the kind of antagonist that Oracle is.

    How short your memory is. Remember when Microsoft tried to destroy Java?

  • What about C++? (Score:1, Insightful)

    by Anonymous Coward on Friday November 12, 2010 @12:16PM (#34207414)

    The language is portable to any platform, very powerful, and isn't at-risk of suffering the same fate as Java.

    The criticisms of it are mostly fluff in my opinion...people trying to say that their personal stylistic perferences should be industry standards, or justifying their own lack of skill by saying C++ makes things harder than they should be, etc.

  • Re:Objective C (Score:1, Insightful)

    by Anonymous Coward on Friday November 12, 2010 @12:16PM (#34207420)

    People complain about Java being verbose and old fashioned. Objective C was invented over 10 years earlier and it feels like it. Java's saving grace is the tools. The modern IDEs are amazing. The only choice for Objective C is Xcode and it feels like a Java IDE from about 2003. I write Java for a living and don't much care for it. But after a bit of Objective C it's a joy to get back to Java.

  • Re:C# (Score:5, Insightful)

    by Raenex ( 947668 ) on Friday November 12, 2010 @12:18PM (#34207450)

    With respect to its languages and development tools, no, not so much.

    Before Mono, all their language and development tools were based around the Windows operating system. Given the history of Microsoft, trusting them to behave nicely with cross-platform computing is foolish. At the end of the day, the only thing they care about is locking people in to Windows.

  • Re:C# (Score:2, Insightful)

    by Mongoose Disciple ( 722373 ) on Friday November 12, 2010 @12:19PM (#34207464)

    I think your choice of the word destroy is more rooted in your biases than fact, and even giving you that I don't see it as relevant.

    It's a big-ass corporation. Trying too hard to generalize their actions in a number of areas over the course of decades is about on the level of deciding that everyone who writes free software probably killed their wife. (And just so we're clear, I'm saying that second thing would be stupid.)

  • by SQLz ( 564901 ) on Friday November 12, 2010 @12:21PM (#34207480) Homepage Journal
    Python doesn't have real threading, Perl is basically dead, and Ruby is slow as shit.
  • Re:Alternatives? (Score:5, Insightful)

    by Kjella ( 173770 ) on Friday November 12, 2010 @12:23PM (#34207522) Homepage

    [Objective-]C[++], Pascal, Fortran, or whatever is just as portable as Java, if not more so.

    Show me a GUI "Hello, world!" that'll run on every platform Java does - even if Java windows look like shit. Java isn't just a cross-platform language, it's also a cross-platform toolkit that hides all the OS specifics, far more than any of the languages you mention.

  • by VGPowerlord ( 621254 ) on Friday November 12, 2010 @12:29PM (#34207606)

    2) Oracle will fail to keep control of Java, and everyone will end up using Java as maintained by an open source group (probably Apache). Ultimately something like the JCP will still be needed to keep enterprise involved in Java.

    Dear lord, I hope it's not Apache. Any organization that allows new versions of its libraries to target Java 1.4 when 1.5 has been out for over half a decade does NOT deserve to be put in charge of the entire language. Particularly when said library [apache.org] deals with Collections.

    As a developer that works primarily in Java, I'm a bit worried. If my company sees Java as being a risk we might end up moving over to .NET, and I just detest the documentation and library design of that platform.

    There are some things .NET does better than Java. This includes: Generics, Properties, GUI, Web Services (although JWS is a marked improvement over Axis 1/2, and brings this more in line with .NET's WCF). This does not include: Database access (although the .NET Entity Framework may address much of this; from what I've seen it's a lot like JPA), Concurrent collections

    Granted, that list is just things I can think of off the top of my head.

  • Re:Why Go? (Score:4, Insightful)

    by mswhippingboy ( 754599 ) on Friday November 12, 2010 @12:39PM (#34207732)
    I agree with MOST of your post, but your statement that "Java is interpreted" is misleading. Java (at least modern Java) is a compiled language, it's just that it's compiled in two stages; once when the java compiler converts the source code to byte code and then when the JVM converts the bytecode to native code during runtime (JIT). To state that Java is interpreted leaves the impression that it results in inferior performance as compared to a traditional source-to-native code compilation process. This is a persistent that myth has been shot down time and time again in real-world benchmarks.

    I'm just sayin'

    As far as something replacing Java - who knows, but I don't see it in anyone's interest (including Oracle's) to throw out the baby with the bathwater. Oracle was already heavily dependent on Java long before they acquired Sun.

    There are already alternatives to the Sun/Oracle Java distribution (the Delvek VM itself might be a good candidate to replace the JVM) and it really boils down to software patents and how far the courts and the broken patent system allows corporations to claim IP over generally accepted concepts. It may just be a matter of forking OpenJDK and calling it "Coffee" to remove it from Oracle's greedy hands (just like OpenOffice being forked as Libre Office). I have a feeling Oracle won't let this happen with Java however because it has too much interest in it. IMHO the best outcome of this would be for Google to prevail, and take down Oracle's patents along with it. Not only would this teach Oracle a (much needed) lesson in how to deal with the OSS world, but it would also remove current obstacles to the acceptance of Java out of fear of Oracle's legal team.
  • Yes. (Score:5, Insightful)

    by abulafia ( 7826 ) on Friday November 12, 2010 @12:45PM (#34207798)

    Understanding that the entire toolchain and widespread adoption is the most important part of getting it. We all (at least, if we were there for it) know how Java happened - the short version is that Sun positioned it as an alternative to the MS Borganism that many companies were rightly afraid of back then.

    I still think Java pretty much sucks. But it has the tools, and perhaps more importantly, a huge number of able bodied code monkeys who can write it.

    Enter Oracle. The entire strategy that they've pursued forever is not much different than what Microsoft tried - build or buy essential parts of the stack, and then march up and down it to dominate your category, then extract as much rent as possible. It works better in the enterprise space and is bloodier because there are fewer players. (Microsoft's ecology was too varied with too many players to really dominate like Oracle can.)

    So, Oracle's strategy is obvious. They own Java, and thus indirectly can manipulate the terms of output of thousands of developers. They don't care about people liking them, and inertia means they can extract rent for a long time (Even if a second Sun/Java moment happened - say, Parrot v. Java, ramp-up for Parrot to fill the niches, get solid, debugged libraries for everything, get widely deployed, and get thousands of developers up to speed takes how long?)

    They don't give a shit about Apache, or developer goodwill [tbray.org]. The for-profit players like IBM have different strategies, but keep in mind that their goals are profit maximization, too.

    So there are some potentially interesting strategic plays to be made between the various players, but anyone with a bit of experience with the business side of the industry has seen this show before.

  • Re:Where is IBM? (Score:4, Insightful)

    by Tanktalus ( 794810 ) on Friday November 12, 2010 @01:08PM (#34208110) Journal

    Big Blue is probably one of the biggest Java development firms in the world. I'm guessing here, but their expenditure on the JVM itself probably rivals Sun's, plus most of their apps either support Java, are partially written in Java, or completely written in Java, and often ship/embed Java (if you have 10 IBM products installed on your machine, you probably have 11 copies of Java).

    Their dependence on Java is, I think, obvious. As is their long-running feud with Oracle in the database sphere. On the other hand, as recently as about 7 or 8 years ago, from what I can tell, AIX spent more money optimising their platform for Oracle than they spent optimising for DB2. Not sure if that's still the case. IBM competes fiercely with Oracle (software) and works closely with them (hardware). I'm not sure why IBM wants to allow the balance of power to shift more in Oracle's direction, actually.

  • Re:Objective C (Score:4, Insightful)

    by SadButTrue ( 848439 ) on Friday November 12, 2010 @01:09PM (#34208112) Homepage

    Objective C is associated with Apple but it's not an apple exclusive. It has the late binding attraction of Java, but the speed of C. It simplifies objects and is easier to write than C++.

    Outside of assembly is there anything that isn't easier to write in than C++? Real question.

  • by Just Brew It! ( 636086 ) on Friday November 12, 2010 @01:16PM (#34208172)

    While Sun may not have had a stellar track record (e.g. their alleged mismanagement of OpenOffice.org), at least they were not trying to actively sabotage things.

    I think LibreOffice has a reasonably clear path forward independent of OpenOffice.org/Oracle, but I am still concerned for the future of MySQL and VirtualBox. At least MySQL has the MariaDB fork (and maybe we'd all be better off migrating to PostgreSQL anyhow). I am not aware of an active VirtualBox development community outside of Oracle though; they're probably at risk if Oracle decides to shake things up.

  • Re:C# (Score:1, Insightful)

    by Anonymous Coward on Friday November 12, 2010 @01:41PM (#34208528)

    Whether Silverlight [thenextweb.com]

    "The world was abuzz with HTML5 and Silverlight innuendo after the SL platform was all but ignored at PDC10. Silverlight developers were furious over what they deemed to be something of a betrayal by Microsoft, nullifying endless hard work."

    I have to say, if you're still a developer for not-Windows Microsoft stuff, I'd think you'd have gotten used to direct betrayl and abandonment by Microsoft by now and learned to ignore it. I mean, after PlaysForSure, the Kin, WM7 destroying anything pre-WM7, and now Silverlight, you'd think you'd have found a pattern by now. And if you haven't, I'm not sure I'd want to hire you as a developer.

  • Re:Alternatives? (Score:5, Insightful)

    by prockcore ( 543967 ) on Friday November 12, 2010 @01:46PM (#34208598)

    Show me a GUI "Hello, world!" that'll run on every platform Java does

    javascript:alert("Hello, World!");

  • Re:Objective C (Score:5, Insightful)

    by iluvcapra ( 782887 ) on Friday November 12, 2010 @01:55PM (#34208728)

    I'm a big Objective-C fan, but running against you are the fact that most of the modern features that give it some parity with Java -- like the GC and the functional programming features -- are only supported by one extremely mercurial vendor that has a nasty tendency of making no 5-year roadmaps. Also the framework and libraries just don't offer the same coverage as Java. A lot of people at the turn of the century bet on WebObjects, which was a serious platform at that time, and now it's abandonware. Nobody wants to get burned like that again.

    Everything I need to know about OSX Xgrid Cluster Computing

    What was I saying about abandonware [pcworld.com]?

  • Re:Alternatives? (Score:5, Insightful)

    by nigham ( 792777 ) on Friday November 12, 2010 @02:22PM (#34209056) Homepage

    Show me a GUI "Hello, world!" that'll run on every platform Java does

    javascript:alert("Hello, World!");

    Hit the nail on the head. Why in the world would anyone decide the future of a language based on its ability to write GUIs in today's web world is a mystery.

  • by ForumTroll ( 900233 ) on Friday November 12, 2010 @02:31PM (#34209140)

    Finally a comment from someone with a clue. The Python and Ruby communities really don't seem to realize how primitive the mainline implementations of their languages are. They're a complete joke when compared to the JVM, the CLR, LuaJIT, SBCL, Clozure or numerous Smalltalk implementations.

    Even the mainline implementation of Factor, which is primarily programmed by one person, makes CPython look utterly terrible.

  • Wrong Tool (Score:3, Insightful)

    by luis_a_espinal ( 1810296 ) on Friday November 12, 2010 @03:01PM (#34209508)

    The language is portable to any platform, very powerful, and isn't at-risk of suffering the same fate as Java.

    The criticisms of it are mostly fluff in my opinion...people trying to say that their personal stylistic perferences should be industry standards, or justifying their own lack of skill by saying C++ makes things harder than they should be, etc.

    C++ is not an application-level programming, but a systems-level one. Java plays both roles. Furthermore, it is not the language that is of value, but the enormous (and standard) class library; a defined component model standard for distributed computing; a defined component model standard for thin-client development; a defined standard for persistence; a defined transactional model; etc, etc, etc.

    Many of the things mentioned above (sans the hiccups and false starts) have been refined, tested and tried on the field for a decade now. That is what's lacking in C++ (a language that I like more than Java... and I work on Java for a living mind you.)

    There are no comparison between the two languages because they are incomparable; defined and designed for two completely different niches and roles. It's not about replacing one language with another, but about replacing an entire ecosystem with another one.

    Having worked on both, worked on Java for the last 12 years (on both application and system development) and about to work again in C++ and C (embedded stuff), I can tell you this:

    C++ (or the lack of equivalent enterprise/distributed plumbing) makes it unsuitable for the roles fulfilled by Java (or .NET). And vice versa, Java (despite having a shitload of de-facto and de-jure standard plumbing) is unsuitable for the roles filled by C++.

    When you work with both languages and when you work on both application and system development, you very quickly how different they are; how silly is to compare them; and how impractical (if not impossible) is to consider using one in place of the other.

  • by aslag ( 1884052 ) on Friday November 12, 2010 @03:04PM (#34209538)

    Python, specifically, is crippled by an old-school interpreter unless you're talking about jython which uses the JVM. To get the features of the JVM that my post argues are essential when picking a replacement for Java, you must run python on Java's JVM! I fail to see how jython can be an alternative to the JVM when it uses it ...

    Again, this isn't about the differences between the Java *language* and the Python *language*. The difference (as I argued before) is in the JVM: Python's (or Ruby's or whatever) code could be the prettiest code around but I still can't use it instead of Java because it doesn't have the features I mentioned.

    Yours is precisely the kind of silly anti-Java argument I find ridiculous: it doesn't even approach the point.

  • Re:Alternatives? (Score:2, Insightful)

    by Anonymous Coward on Friday November 12, 2010 @03:05PM (#34209548)

    Okay. Show me a webapp that can print forms to meet government requirements or fill in fields on preprinted forms.

    Printing is just the lowest hanging fruit. There are literally 1000 things that you can't currently do in a web app.

  • by Herkum01 ( 592704 ) on Friday November 12, 2010 @03:19PM (#34209716)

    So some program you wrote, to do some speed comparisons showing Perl was slower. There was another guy who did the same thing here showing Java was faster than Perl. Of course he used regular expressions in Perl and substrings in Java but why worry about details!

    Perl has lots of things going for it, someone just suggested that it is only good for web programming or such while Java is used for business applications. I hate to tell you folks, a lot of business is getting done on the web. Perl has never really had a problem with performance and considering Slashdot gets web traffic that continually crushes other web sites just by posting a link on the front page you might consider that there might be something to what I said.

  • Re:Alternatives? (Score:5, Insightful)

    by bored ( 40072 ) on Friday November 12, 2010 @03:20PM (#34209726)

    Anyone who's developing thick-client GUIs in this day and age is a fool.

    Right, except when you want to do anything more advanced than basic text/form manipulation. If you go beyond that, it takes 10x as long fighting with javascript/dom/css/etc wedging your UI into html, than the effort it takes to port it to 20 different platforms. There is a reason html is adding a canvas tag. The problem with canvas, is that its the equivalent of giving a modern UI programmer an assembler.

  • by Rob Y. ( 110975 ) on Friday November 12, 2010 @05:46PM (#34211240)

    For 'MS Java', Microsoft gladly took Sun's code and proceeded to use it to build an incompatible version with a vast market share behind it. Essentially it was an attempt to use Java to break cross-platform Java - all the while secretly cloning it so that they could eventually use their market share to promote something else that isn't cross-platform at all. They paid a big fine, chalked it up to cost of doing business, and got all the benefits of Sun's R&D in the process.

    Google built something different. They didn't use Sun code, and they didn't pretend to be implementing the Java standard. They just used the Java language (and libraries) because there's a large pool of developers out there that know them. Kind of like how Linux 'looks like' unix without being unix. Whether you think that's evil or not, it's not what Microsoft did. MS was being evil, underhanded, and all the rest.

    And in the meantime, MS had managed to erode the potential monetary value of desktop Java to the point that Sun had nothing to lose in GPL'ing it, leaving Oracle with some strands of a case, but nothing much (I hope) to really stand on.

  • Re:What about C++? (Score:3, Insightful)

    by n dot l ( 1099033 ) on Friday November 12, 2010 @08:48PM (#34212502)

    I agree emphatically with everything you said.

    I'll add one more thing: debug performance. Most C++ libraries (certainly the STL) are written for prettiness more than performance and thus rely heavily on compile-time optimizations. Now, it's true, a fully optimized iterator generates the same code as a raw pointer, but that's irrelevant when you've got a debug build that runs several orders of magnitude slower than a release, and the bug you're tracking down is on the third pass over vertex 892,472 of a 2,000,000 triangle mesh.

    I mean, yeah, I could rewrite the standard containers and algorithms (etc) into a form that doesn't require heavy inlining to be even remotely performant, but then what was the point of using C++ in the first place?

  • Re:What about C++? (Score:4, Insightful)

    by master_p ( 608214 ) on Friday November 12, 2010 @08:51PM (#34212524)

    C++ has an astonishingly complicated grammar, which means that compilation takes forever and other tools don't work as well as they do for languages with simpler grammars, like C or Java.

    Modern c++ compilers are extremely fast; not as fast as Java compilers, but considering they do much more many things (templates for example), then they are quite fast. They are so fast that compiling large code bases with them is extremely viable, and it's a task done everyday by millions of developers.

    C++ doesn't really have compile-time encapsulation: if you add a private member to a class, you need to recompile everything that uses that class even though the class's public interface didn't change. That woudn't be so bad in and of itself except that C++, again, takes forever to compile.

    How is that a big problem? you make it sound like it's a colossal problem, but in reality, it's not. Unless your class is used by every other class or function, the recompilation is minimal. The benefit of this is that you can use value classes in c++, whereas in Java you can't, every class is by reference, which is stupid.

    C++ also doesn't have run-time encapsulation or really any serious run-time error checking that you don't do yourself. Yes, it's for performance reasons, but some people are working on problems that aren't performance-critical and would prefer a language that doesn't pound nails through our dicks. (if it doesn't have encapsulation, why do they call it "object oriented?")

    If you refer to arrays, vector::at() is your friend. If you are not disciplined enough to use it, then you don't belong in programming. You can even use smart pointer classes that throw a null pointer exception, if you really want it. In any case, it's not anything like you say it is.

    1) If you've allocated some memory for an object, and then you throw an exception, you don't have that pointer anymore, and because C++ doesn't have garbage collection you've just leaked memory. The only way around this is to implement garbage collection yourself; C++ weenies call this "RAII" and if they're really far down the rabbit hole they sometimes don't even realize that it's just them implementing shitty reference-counting garbage collection.

    RAII is actually superior to Java's garbage collection. It's much more critical for big applications to release as much memory as possible upfront.

    2) You can't throw exceptions in destructors. Well, you can, but when an exception is raised, all the destructor for objects on the stack are called, and if one of them throws an exception while you're already handling an exception the program terminates. Seriously, that's what the standard says, I'm not making this up. So you can't throw exceptions in destructors, or call any function that might throw an exception.

    How is that even a problem? Java's unpredictable finalization order is way more of a problem.

    3) In every major compiler I've used, exception handling support is implemented in such a way that it slows down every function call you make. Yes, it's only slightly, but it means if you really care about performance, you can't use exceptions, and if you don't care about performance why the hell are you using C++?

    Read this first: http://www.open-std.org/jtc1/sc22/wg21/docs/TR18015.pdf [open-std.org] Exception handling has a cost only if there are non-trivial destructors to execute. Since C++ allocates most objects statically, the performance cost is factored into the program as if no exception was thrown. On the other hand, in Java, you pay the price in garbage collection.

    And even if you want to use them they're almost worthless; I mean you can't even get a goddamn stack trace out of them.

    True, but you can have other meaningful information, such as the file

  • by mcvos ( 645701 ) on Saturday November 13, 2010 @04:19AM (#34214246)

    Maybe I don't know enough about JCP's value to Oracle, but it seems to me that Oracle is the kind of company that would happily get rid of other people's input in their product, and then blame it on Apache.

  • Re:What about C++? (Score:3, Insightful)

    by master_p ( 608214 ) on Saturday November 13, 2010 @09:25AM (#34215126)

    Often someone's API will be so template-heavy that it takes a full minute (per compilation unit) just to parse their silly headers.

    Simply not true. I use boost heavily on a 120 kloc project, and it takes under a minute to compile everything from scratch. And I use quite a lot of boost features.

    Which is sad because I've never had the same issue with enormous C headers or when referencing a good half of the .NET runtime in a C# compilation.

    You are comparing apples with oranges. Neither C or C# have templates.

    The real problem there, which the GP missed, is the fact that every type must include the header of every type it contains a value member of in its own header. So if I want to keep d3d11.h out of my UI code, then my bridge renderer classes must either dispatch through virtuals, a tedious PIMPL, or not actually use any D3D types as value members, complicating other code for no good reason.

    It's not a problem at all. First of all, the compiler will only parse a header once, if guarded by #ifdef. Secondly, you can use precompiled headers.

    Link-time code generation is old news, object sizes could be resolved then.

    The number of things that can be done in link time is limited. Object sizes play a big role in optimizations, and you can't do some of them at link time.

    With GC I pay a fixed performance cost

    The cost of the GC is not fixed in any meaning of the word 'fixed'. It depends on the complexity of the graph. If your graph is very complex, the GC might take a lot of time to do its job.

    With RAII I have to go around making sure everyone is actually using shared_ptr (or whatever) at every single call site.

    How is that a problem of the language? it's a problem of your development team, not the language. If you have a shitty development team, they can easily mess up a Java program as well.

    Leveraging RIAA kind of demands that such destructors exist.

    You mean RAII obviously (I understand why you wrote RIAA though; it's customary to read something against RIAA at least once per day on slashdot). Yes, RAII demands destructors, and stack unwinding demands destructors to be invoked, but you are in control of it: if your loop is time-critical, then you can get raw and avoid them.

    Sure, if they don't delay it another five years while all the compiler vendors run off and implement incompatible subsets of the proposals because they're tired of waiting for the committee to stop bickering.

    No compiler vendor has implemented a subset incompatibly. The only thing that is left is to clear up move semantics. Other than that, c++0x is ready. I am already using it in GCC 4.5, with exceptional results in code clarity.

    Boost? I thought we were being careful about what we include so as to keep compile times down.

    It's not so bad as you make it to be. Even using boost::bidirectional_map takes very little time to compile on modern machines.

    Templates are useful, until someone goes nuts with traits types and multiple levels of tag-type-param-to-overloaded-function and your debug build ends up six or more orders of magnitude slower than your release because inlining is off.

    Show me a case such as you describe.

    Yes, I use them, but the time spent making sure they aren't being misused is non-trivial and needs to be counted against the time saved by using them.

    Bullshit. You are just quoting something you read over the internet. Show us a such a case.

    So have I. But don't forget the bit where someone spent countless hours making sure everybody else was following the rules and sticking to those libraries, rather than wandering off into std:: or inventing their own little su

Work is the crab grass in the lawn of life. -- Schulz

Working...