Slashdot Mirror


Red Hat Uncloaks 'Java Killer': the Ceylon Project

talawahdotnet writes "Gavin King of Red Hat/Hibernate/Seam fame recently unveiled the top secret project that he has been working on over the past two years, a new language and SDK designed to replace Java in the enterprise. The project came out of hiding without much fanfare or publicity at QCon Beijing in a keynote titled 'The Ceylon Project — the next generation of Java language?'"

623 comments

  1. Hmm by Anonymous Coward · · Score: 0

    A late april fools? Why not call it Sencha? Sounds cooler.

    1. Re:Hmm by gameweld · · Score: 1

      Already taken by the javascript "extJS" framework.

  2. Ceylon? by ArcherB · · Score: 2, Funny

    Am I the only one who read, "Cylon"?

    Do they have a plan?

    --
    There is no "I disagree" mod for a reason. Flamebait, Troll, and Overrated are not substitutes.
    1. Re:Ceylon? by telekon · · Score: 3, Funny

      Am I the only one who read, "Cylon"?

      Do they have a plan?

      The 'Cylon' project requires a meta-cognitive processor, not a VM.

      Although, I had a similar experience reading about the 'Dalvik' VM... Wha... the DALEK VM?

      Finally, it's Red Hat. They have no Plan. The One True God has no frakking patience for RHEL (and neither do I).

      --

      To understand recursion, you must first understand recursion.

    2. Re:Ceylon? by steveha · · Score: 3, Funny

      Am I the only one who read, "Cylon"?

      You are not the only one. My first thought was, "I hope they hire Tricia Helfer to advertise this."

      steveha

      --
      lf(1): it's like ls(1) but sorts filenames by extension, tersely
    3. Re:Ceylon? by Anonymous Coward · · Score: 1

      lol the Sinhalese nationalist nuts are not going to be happy, they want it to be Sri Lanka

    4. Re:Ceylon? by bluemonq · · Score: 2

      They do, but they'll never reveal it, and hope that we forget about it two or three years down the road.

    5. Re:Ceylon? by ronocdh · · Score: 4, Interesting

      It's a reference to the type of tea [wikipedia.org], as an alternative to Java—tea vs. coffee, get it?

    6. Re:Ceylon? by Anonymous Coward · · Score: 5, Funny

      I *am* from Ceylon (Sri Lanka) and yes, Ceylon is to tea what Java is to coffee. Both are islands. http://en.wikipedia.org/wiki/Tea_production_in_Sri_Lanka

    7. Re:Ceylon? by Culture20 · · Score: 4, Funny

      Am I the only one who read, "Cylon"? Do they have a plan?

      No, it's a by-your-command line language. Totally open ended.

    8. Re:Ceylon? by lennier1 · · Score: 3, Insightful

      Do they have a plan?

      If he approached it the same way he did Seam (several different abstraction layers to the point where you're writing and digging through XML and annotations 50% of the time) the answer is simply "NO".

    9. Re:Ceylon? by Anonymous Coward · · Score: 0

      If you have never heard of Ceylon, and your first thought is that it's a misspelling of Cylon... it's time to hand over your geek card and replace it with a "hopeless nerd" card.

    10. Re:Ceylon? by antdude · · Score: 1

      Ditto. Dang compound eyes and missing brain!

      --
      Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    11. Re:Ceylon? by Anonymous Coward · · Score: 0

      Yes, pronounced See-lon and not Sci-lon.
      (pun intended)

    12. Re:Ceylon? by Dahamma · · Score: 2

      Which means it's doomed from the start, no way programmers would choose tea over coffee - not nearly enough caffeine...

    13. Re:Ceylon? by Anonymous Coward · · Score: 0

      Am I the only one who read, "Cylon"?

      Do they have a plan?

      It's Gavin King. The plan is to create fundamentally sound (if occassionally limited) but obscure and difficult to understand frameworks then sell training to big corp, government etc.

    14. Re:Ceylon? by Anonymous Coward · · Score: 0

      Its the old name for sri lanka, an island famous for its tea production.

    15. Re:Ceylon? by poptones · · Score: 1

      So toasters are tea totalers?

    16. Re:Ceylon? by julesh · · Score: 1

      It's a reference to the type of tea [wikipedia.org], as an alternative to Java—tea vs. coffee, get it?

      Err... why did you put [wikipedia.org] in there without a link? Are you trying to drive us crazy?

    17. Re:Ceylon? by Anonymous Coward · · Score: 0

      I find your modding of my perfectly serious comment as Funny, Funny.

    18. Re:Ceylon? by GigaplexNZ · · Score: 1

      As a programmer I must say that I can't stand the taste of coffee, but don't mind tea...

    19. Re:Ceylon? by the_womble · · Score: 1

      Java and Ceylon are used as alternates in a line from a hymn:

      "What though the spicy breezes Blow soft o'er Ceylon's isle Where every prospect pleases And only man is vile"

      Probably not a deliberate reference, unless someone only knows the first sentence of it. That said, a language that pleases will attract some vile developers so it may be inappropriate.

      Ceylon has a bit of an old fashioned ring to it - at least as seen from here in Ceylon.

    20. Re:Ceylon? by Anonymous Coward · · Score: 0

      Modding - U DOIN IT WRONG! "Both are islands" is meant to be an aside. It is NOT the punch line. (angry)

    21. Re:Ceylon? by somersault · · Score: 1

      As a human being (who happens to program for a living) I must say that tea tastes weak and sickly, and coffee is tasty.

      --
      which is totally what she said
    22. Re:Ceylon? by somersault · · Score: 1

      I first saw the word Ceylon at the weekend, as a type of curry.. random that I now see there is a programming language with the same name.

      Toodle pip.

      --
      which is totally what she said
    23. Re:Ceylon? by angel'o'sphere · · Score: 1

      Except that tea usually has more caffeine than coffee ...

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    24. Re:Ceylon? by arth1 · · Score: 1

      I *am* from Ceylon (Sri Lanka) and yes, Ceylon is to tea what Java is to coffee.

      A whiff of the past, as consumers have largely switched to cheaper products and connoisseurs tend to prefer more aromatic varieties from mountain regions (like Darjeeling, Kenya AA and Kona)?

      Both are islands

      So is Sumatra.

      Anyhow, the name is good - it's recognized, unlike Dalvik, and doesn't sound plain silly, like IcedTea. As long as the Sri Lanka vs Ceylon naming controversy won't rear its ugly head, like it briefly did with tea.

    25. Re:Ceylon? by Anonymous Coward · · Score: 0

      As a Klingon I must say that tea and coffee both taste like rainwater, but your blood would have a very satisfying taste.

    26. Re:Ceylon? by Anonymous Coward · · Score: 0

      Hullo machan kohomada!

    27. Re:Ceylon? by Anonymous Coward · · Score: 0

      As a human being (who happens to program for a living) I must say that tea tastes weak and sickly, and coffee is tasty.

      May I hazard a guess that you program for a living in the United States of America, where tea tastes weak and sickly by law? There's a solution for your problem: learn to make a good cup of tea. It's not difficult.

    28. Re:Ceylon? by somersault · · Score: 1

      No, I live in Scotland. I did enjoy a very sugary cup of tea one time when I was freezing after swimming in the sea. The rest of the time it just tastes like.. tea.. yuck.

      --
      which is totally what she said
    29. Re:Ceylon? by silverglade00 · · Score: 1

      Err... why did you put [wikipedia.org] in there without a link? Are you trying to drive us crazy?

      It's a reference to the type of website [geocities.com] used to look up the information.

    30. Re:Ceylon? by Anonymous Coward · · Score: 0

      Do you know Del Monte?

      Some pineapples there. Pineapples like you would not believe.

    31. Re:Ceylon? by LizardKing · · Score: 1

      Agreed. If it performs as poorly as Hibernate, has as many bugs as many of the host drivers (thinks of the Postgres one in particular) and encourages you to do things in a really annoying way (like annotated beans that are the actual schema), then definitely "NO".

    32. Re:Ceylon? by tehcyder · · Score: 1

      Which means it's doomed from the start, no way programmers would choose tea over coffee - not nearly enough caffeine...

      I thought tea had more caffeine in it than coffee?

      --
      To have a right to do a thing is not at all the same as to be right in doing it
    33. Re:Ceylon? by Anonymous Coward · · Score: 0

      Sri Lanka is still around? Didn't Pakistan purchase it for like 10 dollars?

    34. Re:Ceylon? by Nadaka · · Score: 1

      By mass it does. But you usually use less mass of tea leaves to make tea than you do with coffee beans to make coffee. Tea's caffeine is also bound in leaf flakes that have less surface area than finely ground coffee. Finally, thanks to that fine ground nature, a larger amount of solid coffee ends up in the drink than does tea that is more easily caught by a filter.

      To get a good high caffeine tea, you must grind the tea very well, use boiling water rather than merely hot water (place your tea in the teapot rather than pouring water onto your tea where it rapidly cools) and filter it very poorly.

    35. Re:Ceylon? by Anonymous Coward · · Score: 0

      Sure they have "a plan"....

      The plan is to randomly determine how the project ends and then pretend that was their intent the whole time.

    36. Re:Ceylon? by jecblackpepper · · Score: 1

      Only in dry weight, not when brewed into a tasty beverage.

    37. Re:Ceylon? by Tetsujin · · Score: 1

      As a Klingon I must say that tea and coffee both taste like rainwater, but your blood would have a very satisfying taste.

      Here, why don't you try some of this... it's called "Prune Juice".

      --
      Bow-ties are cool.
    38. Re:Ceylon? by Tetsujin · · Score: 1

      Am I the only one who read, "Cylon"?

      Do they have a plan?

      No, it's a by-your-command line language. Totally open ended.

      Just what we need, yet another trendy programming language that people will learn just because it's shiny and new.

      --
      Bow-ties are cool.
    39. Re:Ceylon? by Amouth · · Score: 1

      tea tastes weak and sickly, and coffee is tasty.

      then you have some crappy tea - most coffee people make anyways is so over roasted that it is burnt before it is even brewed.

      I made the switch from Coffee to Tea a couple years ago - some days i make coffee (like to day actually) but most i now make Tea - it sits so much better.

      --
      '...if only "Jumping to a Conclusion" was an event in the Olympics.'
    40. Re:Ceylon? by Jonner · · Score: 1

      It's an attempt at a clever name, since Ceylon is an old name for Sri Lanka, another Asian island. Today (at least in the West) the name Ceylon is mostly associated with tea and Java mostly with coffee, to add another layer of cleverness.

    41. Re:Ceylon? by Anonymous Coward · · Score: 0

      Then you're making it wrong.

    42. Re:Ceylon? by Anonymous Coward · · Score: 0

      no!lol

    43. Re:Ceylon? by somersault · · Score: 1

      Or, you know, maybe I just don't like tea in the same way that I don't like mushrooms. Slightly burnt tasting filter coffee is annoying, but still much preferable to tea.

      --
      which is totally what she said
    44. Re:Ceylon? by AnujMore · · Score: 1

      I *am* from Ceylon (Sri Lanka) and yes, Ceylon is to tea what Java is to coffee. Both are islands. http://en.wikipedia.org/wiki/Tea_production_in_Sri_Lanka

      Competing Indian tea with Lankan tea. OMG. What a waste of time.

    45. Re:Ceylon? by Amouth · · Score: 1

      you said it tasted "weak and sickly" not "i just don't like it" if the complaint is that it is "weak and sickly" i could recommend some very strong and full flavor back teas .. if it is "i don't like it" you have a bias and therefor it's not worth bothering with.

      --
      '...if only "Jumping to a Conclusion" was an event in the Olympics.'
  3. C#/Mono similar? by danbuter · · Score: 1

    It will be interesting to see if it is very similar to C#/Mono or something fairly different.

    1. Re:C#/Mono similar? by Anonymous Coward · · Score: 2, Insightful

      If C# didn't kill Java, I don't see how anything else is going to.

    2. Re:C#/Mono similar? by Anonymous Coward · · Score: 1

      Two words: Oracle.

    3. Re:C#/Mono similar? by Anonymous Coward · · Score: 5, Funny

      Two words: Oracle.

      What's the second word?

    4. Re:C#/Mono similar? by flatt · · Score: 1

      Java

    5. Re:C#/Mono similar? by Anonymous Coward · · Score: 3, Funny

      "FuckingBullshitAss Oracle" is implied whenever somebody says "Oracle".

    6. Re:C#/Mono similar? by Megaweapon · · Score: 4, Funny

      Two words:

      Oracle.

      What's the second word?

      Lawyers.

      --
      I'm sure "SlashdotMedia" will improve on all the wonders that Dice Holdings blessed us all with
    7. Re:C#/Mono similar? by Anonymous Coward · · Score: 1

      How so? Do you consider C# as competing in the same space as Java but a vast improvement? There aren't many backers for that thesis. .Net introduced an abstraction layer exactly where it wasn't needed - in the syntax.

    8. Re:C#/Mono similar? by tomhudson · · Score: 2

      Two words: Oracle.

      What's the second word?

      You're not pronouncing it properly. Pronounce the two syllables as two words. "Ora Kill", same as Larry Ellison does.

    9. Re:C#/Mono similar? by Anonymous Coward · · Score: 0

      Words

    10. Re:C#/Mono similar? by Anonymous Coward · · Score: 2, Insightful

      If C# didn't kill Java, I don't see how anything else is going to.

      Yes, because a proprietary, patent encumbered, single-platform copy of Java with minimal enhancements was surely going to kill Java.

      </sarcasm>

    11. Re:C#/Mono similar? by Kagetsuki · · Score: 1

      That is the second word, the first one is F*ck.

    12. Re:C#/Mono similar? by ThePromenader · · Score: 1

      ...cle.

      --

      No, no sig. Really.

      ThePromenader
    13. Re:C#/Mono similar? by m50d · · Score: 2

      All I hear about the C# patent is FUD; mono is out there and hasn't been sued yet. Wheras there are actual known Java patents that stopped the Apache foundation from reimplementing java.

      --
      I am trolling
    14. Re:C#/Mono similar? by arth1 · · Score: 1

      Pronounce the two syllables as two words. "Ora Kill"

      And that's how many syllables, again?

    15. Re:C#/Mono similar? by silanea · · Score: 1

      No-one implied that Java was not patent encumbered. C# just picks up on that fault and throws in a few additional headaches for good measure. And forget Mono. I tried to run all kinds of .NET applications on it. Few worked at all, most simply crashed. Unless the developer aims for Mono compatibility - and keeps in mind that Mono runs on OSes other than Windows - and shies away from the more bleeding-edge features of .NET it is easier and more reliable to install the .NET framework in Wine and run the application on that. And I am not even talking about software of enterprise-level complexity.

      IMO Java sucks hard, but the one thing it got right was the "build once, run everywhere" part. I seldom have a Java application go ballistic on me because my VM does not match that of the original developer. It happens so little I am inclined to ascribe it to stupid programmers in the cases that it does occur. .NET applications that are not specifically targeted at Mono are a pain at best and lost cases at worst.

      (That being said personally I would love to see both platforms die a quick but excessively painful death.)

      --
      Rudolf Hess edited Mein Kampf. He was the very first grammar nazi.
    16. Re:C#/Mono similar? by asylumx · · Score: 1

      What's the second word?

      Winning.

    17. Re:C#/Mono similar? by thetoadwarrior · · Score: 1

      You're supposed to say it twice.

    18. Re:C#/Mono similar? by maxwell+demon · · Score: 1

      The second word is so terrible that no one ever speaks or writes it. Even thinking it may give you a year in a psychiatric clinic.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    19. Re:C#/Mono similar? by Nadaka · · Score: 1

      C# is a bit easier on the developer, I actually like the language itself a little better than java. But the CLR just doesn't have the performance and stability of the JVM to make it a better option for serious work.

    20. Re:C#/Mono similar? by PickyH3D · · Score: 1

      When C# first came out, it already had minimal enhancements compared to Java. Now, in version 4, it has numerous enhancements compared to Java. Here are some.

      If the .NET Platform were multiplatform, then I would jump ship in a second. As it is not, then I am relegated to working with Java day-to-day. That is the only snag with C#, and that's only until Mono really picks up, or likely until Apple grows its OS X market share.

    21. Re:C#/Mono similar? by Haeleth · · Score: 2

      mono is out there and hasn't been sued yet.

      That's because that's not the main trap that Mono represents.

      Microsoft tolerates Mono because it's a clone of a Microsoft technology. They haven't tried to stop Wine, either. Microsoft knows what most of the useful idiots who support the use of Mono appear not to have realized: if your business is in any way, shape, or form built on Microsoft technologies, you will face extreme pressure from all sides to move to a full Microsoft stack.

      The patent angle will only ever be used if it looks like Mono is causing important customers to migrate away from Windows. But that isn't happening.

    22. Re:C#/Mono similar? by Daniel+Phillips · · Score: 1

      mono is out there and hasn't been sued yet

      Yet.

      --
      Have you got your LWN subscription yet?
  4. Something to watch by fnj · · Score: 1

    Sounds attractive but very ambitious.

    1. Re:Something to watch by zill · · Score: 4, Interesting

      I personally don't think it's ambitious at all. Their syntax and grammar only differ slightly from regular Java. Plus the fact that they're targeting the JVM means that they only need to patch javac (and javadoc) to make a new language. Despite how humongous the JDK is, the java compiler itself is relatively lean (only 140KLOC).

    2. Re:Something to watch by Kagato · · Score: 2, Insightful

      The selling point to the enterprise is the JDK. If it was all about a better language that develops quicker they could have gone for Ruby years ago. In particular once sun brought JRuby in-house. The issue at hand is the Enterprise wants the bloatware in the J2EE SDK. Those classes and libraries represent a lot of work a developer doesn't have to figure out themselves.

    3. Re:Something to watch by fusiongyro · · Score: 2, Insightful

      Those classes and libraries represent a lot of work a developer doesn't have to figure out themselves

      What? Those classes represent a lot of work the developer absolutely has to figure out themselves. Nobody just looks at J2EE and goes, "hey, that makes sense." J2EE costs time and money, it doesn't save time and money.

    4. Re:Something to watch by jd · · Score: 2, Interesting

      Oracle have threatened to sue anyone and their aunt Mildred if they step out of line on the Java standard or violate any Java-related patent. Apache needs a JVM-type system to run Tomcat and Debian will supply patentware over their collective dead bodies (once an open-source license for dead bodies is agreed upon). Red Hat knows this. Red Hat also knows that commercial vendors like Adobe (Cold Fusion runs on JRun, a servlet engine) like Java because nothing makes for bigger profits than free. Patent-based lock-ins don't usually mean free. Sun killed JScript, sure, but we're talking proprietary extensions and a platform-specific compiler designed by Microsoft for the sole purpose of killing Java. It was a digital gunfight and it's not surprising Sun used the guns it had.

      Oracle, on the other hand, already uses proprietary extensions (they bought JRockit and it has all kinds of weird stuff), platform-specific compilers (you'll notice real-time Java isn't available for that many OS') and proprietary implementations (JDK7 doesn't include some of Oracle's accelerations to JDK6). Language dilution - and the inevitable long-term death of Java as a result - isn't an issue for them. They're not using patents to protect Java, but to protect a virtual monopoly.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    5. Re:Something to watch by julesh · · Score: 4, Insightful

      Yes, but it also means you don't have to figure out how to persist your objects to your database, how to transfer them seamlessly from one box to another in a load balanced environment, how to manage the lifetime of per-user and per-session objects, how to set up your system to locate the URLs of your web services, how to send messages from one object to another on a remote machine, how to store your resources so that they can be altered without recompilation, and many other things...

      Sure, J2EE takes a while to learn. But it provides a whole load of features that would take a lot longer to write if you had to do them from scratch.

    6. Re:Something to watch by DrXym · · Score: 2

      Sounds attractive but very ambitious.

      Let's not forget that Microsoft has thrown its weight behind the .NET platform which is arguably superior to Java in many (but not all) ways and they still haven't even dented the popularity of Java.

      Part of the issue is that Java just works. It may be verbose, horribly broken in some respects but it still works. The only way you're going to wean people of vanilla Java is to produce a Java++, something which compiles syntactically correct Java with no modifications, supports all existing Java libs with no modifications, but offers some rich extensions that reduce the amount of crud / boiler plate developers have to write and hopefully eliminate a bunch of potential bugs too.

      No language which is not a superset of Java really stands a chance. People promoting Scala, Google Go, Ruby or similar are pissing into the wind on this matter. It has to be a superset, or close to one of what already exists. Arguably even Groovy isn't close enough. I hope Red Hat take this on board and look at the limited success that other Java wannabes have enjoyed so far.

      Aside from the language aspect I think Apache & Google would be the natural partners to promote this language. I don't know how that sits with Red Hat but really there needs to be a consortium of heavy weights to promote mind share amongst developers and popularise a migration. I expect most Java developers would be happy for walk away from Oracle / Suns pathetic stewardship if there were something better and compatible to go to.

    7. Re:Something to watch by aaaaaaargh! · · Score: 1

      I somehow disagree. If they gave up the requirement that it has to run on the Java VM, they could just hire a CS graduate to write a wrapper around typed racket. The whole thing would take someone who is familiar with Racket no more than a few months. A real hacker might even be able to do it in a few weeks.

    8. Re:Something to watch by DrXym · · Score: 2

      J2EE costs time and money, it doesn't save time and money.

      Every language costs time and money to learn. In Java's case it's not the language so much as all the technologies that are built with it. That, in a nutshell is why any replacement for Java has to be as close to 100% compatible as possible. You literally want to be able to sit a Java developer of any competence in front of MiracleJ or whatever the language is called and for them to not notice much difference. It should feel comfortable, familiar. It should build the mass of code they likely have to maintain.

      As time progresses of course, you can wean them off the horrible crud / boilerplate they're used to and show them all the shortcuts, notations & new features that cut down the code they have to write. Much in the same way as happened in C to C++ migration. C++ was seen as C but better (yes I know there are very slight differences) so virtually every developer migrated across in due course. It should feel so natural to migrate that you have to have very explicit and esoteric reasons for staying put.

    9. Re:Something to watch by hattig · · Score: 1

      An enterprise language is actually a platform that includes massive amounts of APIs and frameworks to build your application around.

      Sure, you can create a new language really easy. But then you need to create the APIs and frameworks that enterprise development requires.

      So to get these libraries you compile your language to the JVM, and allow it to access other classes that are compiled to the JVM, regardless of the language they were written in. Over time you can create native implementations of the libraries until you are free of the old platform, but at least you are relevant during that time.

      Maybe we will be talking about Ceylon development in earnest in 2020. I wish them the greatest of luck, especially if they can create a decent native Collections framework and UI framework.

    10. Re:Something to watch by kaffiene · · Score: 2

      In what way is Scala not a super set of Java?

    11. Re:Something to watch by DrXym · · Score: 2

      Scala is not a superset of the Java language. It may be byte code compatible which is not the same thing at all. By that definition Jython would also be a superset of Java since it too generates bytecodes and runs on a JVM.

    12. Re:Something to watch by angel'o'sphere · · Score: 1

      What exactly does cost time in our days if yo use J2EE?

      One guy is making the Spring configuration, the other guy is doing the JPA annotations and configures Hibernate or something like it.

      And you lazy bastard are only programming plain old Java objects ...

      J2EE saves a lot of time ... if you are to lazy to learn it yourself, yes, that costs time, then do the low programming jobs.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    13. Re:Something to watch by Kagato · · Score: 1

      I can guarantee it takes less time to read up on the J2EE JMS implementation than it takes to roll your own. It's the same reason why most enterprises run a commercial Application server like WebLogic or WebSphere over Tomcat and GlassFish. They want to be able to extend pre-packaged functionality that someone else has put through the paces.

    14. Re:Something to watch by GooberToo · · Score: 1

      The selling point to the enterprise is the JDK. If it was all about a better language that develops quicker they could have gone for Ruby years ago. In particular once sun brought JRuby in-house. The issue at hand is the Enterprise wants the bloatware in the J2EE SDK. Those classes and libraries represent a lot of work a developer doesn't have to figure out themselves.

      Why the hell is this insightful? Its not even accurate.

      The closest non-commercial competition Java has is Python. Ruby has a fraction of the user base, activity, and library/frameworks of Python. Bluntly, no one cares about Ruby except those who are largely comp-sci "rebels". Seriously, that is Ruby's core demographic. Ruby's demographic alone means it is anti-enterprise. Remember, Ruby is Python for rebels.

      And despite everything Python has going for it, it can't challenge Java in the enterprise because there isn't a massive commercial backer pushing it into the enterprise. It really is that simple.

      And what you're calling "bloatware" is exactly why Java has deep roots in the enterprise. It can be everything to everyone; which is impossible for Ruby. Basically, there is absolutely nothing you said which makes sense or is the least bit reflective of reality. The fact others deemed it "insightful", is just downright scary.

    15. Re:Something to watch by DetriusXii · · Score: 1

      Then define what you mean as a superset.

    16. Re:Something to watch by Phleg · · Score: 2

      People promoting Scala, Google Go, Ruby or similar are pissing into the wind on this matter.

      What in god's name makes you think we want the legions of mindless Java programmers to join us?

      --
      No comment.
    17. Re:Something to watch by LizardKing · · Score: 1

      It's the same reason why most enterprises run a commercial Application server like WebLogic or WebSphere over Tomcat and GlassFish.

      Err, no. They use Spring.

    18. Re:Something to watch by DrXym · · Score: 1
      I just did ffs.

      The only way you're going to wean people of vanilla Java is to produce a Java++, something which compiles syntactically correct Java with no modifications, supports all existing Java libs with no modifications, but offers some rich extensions that reduce the amount of crud / boiler plate developers have to write and hopefully eliminate a bunch of potential bugs too.

    19. Re:Something to watch by CynicTheHedgehog · · Score: 1

      I've worked in many an enterprise and I have yet to use Spring for anything other than perhaps embedded unit testing of EJBs/JMS. And when it comes to that, I prefer OpenEJB anyway (although OpenEJB can be integrated with Spring if you absolutely have to).

      Spring is to JEE as Struts is to JSF. It was an interesting precursor, but the improvements made in subsequent JDK releases have made it obsolete.

    20. Re:Something to watch by CynicTheHedgehog · · Score: 2

      So let me get this straight. It's better for someone to take, for example, C, or Ruby, or PHP and implement roll their own implementations of:

      1. Thread pool management
      2. Load balancing and fail-over
      3. Session replication
      4. Distributed transaction management
      5. Naming directory
      6. EIS connection management
      7. Pluggable authentication and authorization
      8. HTTP request parsing and invocation
      9. Tags and markup for data binding / AJAX support
      10. UI component model
      11. Logging
      12. Web service management and deployment (including WSDL generation and publishing)
      13. XML binding (marshaling and unmarshaling)
      14. And so forth and so on

      Now in this scenario the implementations will likely:

      1. Only implement the functionality that is (perceived to be) needed
      2. Will not be tested
      3. Will not have the benefit of community scrutiny, certification, or knowledge
      4. Will not be immediately understood by any developer other than the author(s) regardless of how much experience they have

      Yes, you have to invest to learn JEE.

      Yes JEE deals with complex issues and as a result is difficult to understand.

      However, having invested that time, anyone who knows it in one place knows it everywhere. That is what saves time and money -- being able to hire someone who already knows JEE and have them hit the ground running.

      Further, having a prescribed solution for many common problems allows developers to focus on the business needs, not the boilerplate.

      Anyone who does not appreciate what JEE brings to the table is not a serious enterprise developer.

    21. Re:Something to watch by Kagato · · Score: 1

      The key to my post was JRuby. It's ruby that can run inside the java VM, can import most Java Libs for use with native Ruby Code and when run in a commercial app server takes advantage of execution caching and various J2EE services (i.e. JMS). From that stand point JRuby can have all the bloatware of Java and a commercial App Server if you wanted to. However, you can also do it without all the bloat on a smaller scale that you could develop quickly and deploy it inside your existing java infrastructure.

      So, I wouldn't be throwing stones about insightful or accurate until you've done your homework.

    22. Re:Something to watch by Kagato · · Score: 1

      Spring is always about 3 steps ahead of Java because they don't have some huge committee to deal with. EJB3 would have never happened if Spring hadn't become (rightfully) popular. Which is how they because a $200+M year company before VM bought them. As it stands they have a dozen projects that fill the gaps in Java. You want a security framework that actually does something from day1 you get Spring-Security, you can to integrate non-relational data into JPA you get Spring-Data, want to manage batch processing you get Spring-Batch, etc, etc.

      Some of these areas it's unlikely Java will implement because committee members sell commercial products that fill those gaps as well. There's a lot of hatting on Spring that I don't get. They basically Apache with bigger goals and a commercial support division.

    23. Re:Something to watch by GooberToo · · Score: 1

      Just because it runs on the JVM doesn't mean its fast. For example, Jython runs roughly 4x slower than cpython.

      As for the rest, if you're going to use Java services, you may as well continue to use java services and actually have a supported platform.

    24. Re:Something to watch by jfengel · · Score: 1

      Is javac really 140KLOC? That seems like a lot. The java->bytecode transform is relatively simple. The real work is all done in the JVM.

      I suspect it's mostly in the error handling. Good error reporting and recovery is far, far harder than the actual compilation step in any language.

    25. Re:Something to watch by Tupper · · Score: 1

      For what it's worth, Scala can compile with vanilla Java. You can't have them both in the same file, but you can have everything else, including mutual dependencies. Scala can use all existing libs with no modifications. "Effective Java" is most of the way to Scala.

      Scala is a superset of Java in a way Jython is not because Scala has all the features of Java in a way Jython does not. Annotations, static typing, main methods, hash codes and many more are still there from Java. Admittedly, some misfeatures were left on the cutting room floor--- primitive types, special syntax for arrays, call-side variance, etc.

    26. Re:Something to watch by Eli+Gottlieb · · Score: 1

      Since that's the development path which gave us C++, let's not dare go down there again.

    27. Re:Something to watch by zill · · Score: 1

      I did a line count on this file, which includes all the java source file processing tools: javac, javah, javadoc. Since they share a lot of code (the front end is the same), I can't tell the proportionality of the javac code in there.

    28. Re:Something to watch by Daniel+Phillips · · Score: 1

      What in god's name makes you think we want the legions of mindless Java programmers to join us?

      Oh I don't know, the fact that they write most of the business code out there?

      --
      Have you got your LWN subscription yet?
    29. Re:Something to watch by Vanderhoth · · Score: 1

      How about because if you were able to convert the legions of Java developers to (language of choice), it would become the next big thing to use. As a result more employers would be looking to hire experienced developers in (language of choice).

    30. Re:Something to watch by fusiongyro · · Score: 1

      The time sink is: learning J2EE, running J2EE, developing on J2EE, debugging on J2EE and deploying J2EE. If you don't agree, you obviously haven't ever tried: C#, PHP, Ruby, Python, Clojure, Smalltalk or Haskell, and you've never tried ASP MVC, Rails, Merb, Sinatra, Play, Seaside, CakePHP, Zend Framework, GWT, Cappuccino, SproutCore, Erlyweb, Yesod, Happstack, Snap, Zope 2, Grok or Compojure. The only thing J2EE is good for is being J2EE when an idiot with a fat wallet demands J2EE. For anything else, there's everything else.

    31. Re:Something to watch by angel'o'sphere · · Score: 2

      Well, I tried a lot of the things you mention. However

      I'm not really sure why you mix languages and technologies in you sentence that have nothing in common with each other and a few of them are even JVM languages (which means they need J2EE support anyway).

      As I pointed out most people don't actually use J2EE in the way it was originally conceived.

      Most people use a Tomcat, Spring and Hibernate, thats it. If you want to have an app server (JBoss etc.), you should have a reason for it.

      For me it is absolutely no difference in what environment I debugging, first of all debugging takes perhaps %1 of my development time. I don't debug framework code, unless I'm sure the bug is there. Second we mainly have test cases on use case level, if I need to debug something I start that "Test" in debug mode.

      Regarding deploying, I cant see any significant difference between deploying a PHP Application under Zend or a few *.war/*.jar files under Tomcat.

      Well, frankly your post looks like if you just have put lots of buzzwords and frameworks/languages into one long sentence.
      C# -- does not run everywhere, mediocre support regarding equivalents of J2EE
      PHP -- half interpreted, not really compiled, flawed runtime library
      Ruby -- just not my taste language wise, but also reinvention of lots J2EE features, basically useless without RAILS
      Python -- just a language ... don't get your point
      Clojure -- runs on the JVM and is a Lisp dialect
      Smalltalk -- again only a language, as soon as you wan't to do big scale stuff you also need frameworks
      Haskell -- a language, what support does it have for scaling large applications I don't know
      CakePHP -- obviously for PHP
      Zend Framework -- PHP
      GWT -- pretty useless without J2EE behind it, so what is your point?
      Cappucino -- looks promising on the client side, that leaves again open the server side
      Zope -- is a python framework/runtime engine, it is difficult to scale
      ASP MVC -- a MS technology like C# ... dead end why should I use that?
      Grok -- based on Zope if I'm not mistaken
      Rails -- well, based on Ruby, see above - basically only really useful for simple DB and page driven web applications
      Sinatra -- again a Ruby web framework

      I doubt idiots with fat wallets demand J2EE. Most of the time they demand:
      * Java
      * has to fit into our backend infra structure
      * has to access our databases
      * new databases (for this application) should run on the same software
      * has to scale
      * my own programmers need to maintain it (hence the requirements above)
      * needs to be open so future extensions / services can interoperate with it

      Anyway, the main critics about J2EE comes from the time when it was "invented" ... it has evolved considerably since then.

      Usually you have only a little effort when you set up the project for the first time. As soon as you start working on it you mainly program POJOs, easy to test with unit tests, and the interaction among them via the frameworks are easy to test with scenario driven tests. If you have to debug, you lack experience (or someone in your team who is responsible for the fact that you have to debug). Keep in mind: with hot code replacement most developers program in the running environment in debug mode anyway (that excludes me, as I prefer to "clean room" develop my code and think while I work and see if the test runs).

      So, how would I develop a huge new application?
      GWT for the frontend, development of server components in Scala and Java, glueing it together and giving functionality close to the front end with Groovy. Testing with JMeter (backend Services) and Selenium (Web Pages) and JUnit for low level stuff if needed, backend access likely directly on the DB with iBatis, or via dedicated backend services which are best accessed via REST.

      Small scale applications: GWT for client, hibernate/iBatis services as GWT server components. The only J2EE you need here is a tomcat (or similar) an

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    32. Re:Something to watch by Phleg · · Score: 1

      Supply and demand. Right now, demand for experienced developers in my language of choice greatly outstrips supply. Explain to me why it's in my best interest to become commoditized.

      --
      No comment.
    33. Re:Something to watch by Vanderhoth · · Score: 1

      How about because supply can drive demand just as much as demand can drive supply?

      As an example:
      If there's only one developer in the world for language X. I highly doubt many business units are going to want to write applications in that language. It would just not be feasible to find developers to maintain code.

      On the other hand if language X has a healthy following of developers, business units will want applications written in that language. It makes economic sense for them to do so as it's easier to find developers to write and maintain the code.

      Maybe you'll get paid more if you're the one of a few developers that know a language. It's much more difficult to find a job as a Cobol program then if you're a Java developer, but Cobol programmers make a hell of a lot more.

    34. Re:Something to watch by degeneratemonkey · · Score: 1

      It's much more difficult to find a job as a Cobol program

      Seriously, man. I once had a Cobol program show up for an interview, and all it did was sit there, limp and silent and motionless upon the table. I had to leave for a meeting after two hours of trying to elicit some kind of communication. Guy's still sitting there a week later. Some people.

  5. Because Scala, JRuby, Groovy, Clojure ... by Anonymous Coward · · Score: 3, Insightful

    aren't enough (damn subject would have dropped the 'h' and that would have made me cry).

    We need yet another JVM language to 'kill' Java. Epic. Brilliant.

    The other languages were developed much more openly, not dropped like an MS product. Get real, Red Hat.

    1. Re:Because Scala, JRuby, Groovy, Clojure ... by Kagato · · Score: 1, Informative

      Mod up. It's a fair point.

    2. Re:Because Scala, JRuby, Groovy, Clojure ... by Anonymous Coward · · Score: 1

      No way! Grandparent is missing Jython.

    3. Re:Because Scala, JRuby, Groovy, Clojure ... by shutdown+-p+now · · Score: 2

      In all honesty, all the projects that you've listed make their stated goal to be less "enterprise" than Java in overall feel. Whereas here the authors specifically say that they want to kinda get to where Java would have been, if it were designed from scratch today rather than in early 1990s.

    4. Re:Because Scala, JRuby, Groovy, Clojure ... by buchner.johannes · · Score: 1

      I have an issue with people throwing away the excellent JVM just to use a new language.

      I hope they plan to build on or recycle the JVM -- so much effort has gone into making it portable, secure and reliable, why re-invent that.

      --
      NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
    5. Re:Because Scala, JRuby, Groovy, Clojure ... by M.+Baranczak · · Score: 3, Insightful

      I have an issue with people throwing away the excellent JVM just to use a new language.

      Right at the top of The Friendly Article, for which a link has been conveniently provided: "It is built to run on the JVM".

      so much effort has gone into making it portable, secure and reliable, why re-invent that.

      Because of the patents held by Oracle? It's still up in the air as to whether or not those patents mean anything, but if they do, then we may be forced to reinvent it.

    6. Re:Because Scala, JRuby, Groovy, Clojure ... by 21mhz · · Score: 3, Insightful

      here the authors specifically say that they want to kinda get to where Java would have been, if it were designed from scratch today rather than in early 1990s.

      Um, then they would have it natively support the entire Unicode repertoire rather than remaining in the 16 bit trap that Java fell to along with other platforms of that time.

      --
      My exception safety is -fno-exceptions.
    7. Re:Because Scala, JRuby, Groovy, Clojure ... by shutdown+-p+now · · Score: 2

      Java has been using UTF-16 (which "supports the entire Unicode repertoire") for ages. If you access individual chars in a string, you've got to handle surrogate pairs on your own, sure, but why do you even do that? Stock string methods can handle it all just fine.

    8. Re:Because Scala, JRuby, Groovy, Clojure ... by Anonymous Coward · · Score: 1

      Let's see...

      Clojure is a LISP and therefore too alien to most Java/C# programmers to even consider.

      Groovy and JRuby are different weight classes, being focused on faster programming but much slower execution.

      Scala is cool in theory, but lots of its nice features have significant overhead over simply doing things the Java way. (for loop, traits, implicit conversions, Option[T])
      In addition scalac is the slowest compiler I have ever worked with, while Scala's IDE modes for Eclipse, Netbeans and IntelliJ are painfully sluggish.

    9. Re:Because Scala, JRuby, Groovy, Clojure ... by Anonymous Coward · · Score: 2, Insightful

      That's one of my pet peeves about Java.
      Imagine how much memory and CPU time could be saved by all the Java web applications out there, if Java used UTF-8 instead of UTF-16. Same thing goes for .NET/Mono. The only kind of application that benefits from native UTF-16 is one calling into winapi.

    10. Re:Because Scala, JRuby, Groovy, Clojure ... by godefroi · · Score: 1

      'cause 8 bits should be enough for anyone, amirite?

      --
      Karma: Poor (Mostly affected by lame karma-joke sigs)
    11. Re:Because Scala, JRuby, Groovy, Clojure ... by JesseMcDonald · · Score: 3, Informative

      In this case, yes. Just like UTF-16, UTF-8 can encode any Unicode character up to 31 bits (U+7FFFFFFF). Since both are variable-length encodings, UTF-16 is no simpler to work with. UTF-8 has the additional advantages of being identical to ASCII for the first 128 codepoints, using a single byte order vs. big-endian/little-endian UTF-16, not embedding NUL characters, generally taking less space, not being confused for UCS-2, etc.

      See also: advantages of UTF-8 compared to UTF-16

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    12. Re:Because Scala, JRuby, Groovy, Clojure ... by 21mhz · · Score: 1

      In this case, yes. Just like UTF-16, UTF-8 can encode any Unicode character up to 31 bits (U+7FFFFFFF).

      Up to U+10FFFF, but still.

      not being confused for UCS-2

      This is probably the biggest advantage. There are untold amounts of n00b code that assumes one 16 bit character == Unicode character ('cause they were advertised this way when introduced, right?). With the multibyte encoding of UTF-8 everybody should be expected to trust what the pigeonhole principle tells them and use some iteration in terms of Unicode character code points.

      --
      My exception safety is -fno-exceptions.
    13. Re:Because Scala, JRuby, Groovy, Clojure ... by 21mhz · · Score: 1

      The biggest issue with this is, a Java char is not what it says on the tin since 2001. And no, many stock string methods promote bug-inducing behavior like that of substring, which millions of developers use to this day.

      --
      My exception safety is -fno-exceptions.
    14. Re:Because Scala, JRuby, Groovy, Clojure ... by shutdown+-p+now · · Score: 1

      I agree that "char" is a misnomer. They definitely did make a mistake of starting with UCS2. Ditto for WinNT, by the way (which is also why .NET has that defect - otherwise it'd have to re-encode strings back & forth when working with OS APIs).

      As for substring and the likes - it is inherently flawed from i18n perspective even if it treats surrogate pairs correctly. There are numerous other issues, such as what it should do with combining characters (treat them as part of the char to which they apply, or as separate chars?). Ultimately the problem is that the concept of "character", even when you define it precisely per Unicode wording, is not particularly relevant to the end user. And why would you be using proper Unicode-aware substring(), except to either trim user input, or to format user output? So, really, it's a function that has no place in a properly localizable code.

      Whereas for other tasks (e.g. trimming identifiers), working on UCS2 level is pretty much always adequate.

    15. Re:Because Scala, JRuby, Groovy, Clojure ... by JesseMcDonald · · Score: 1

      In this case, yes. Just like UTF-16, UTF-8 can encode any Unicode character up to 31 bits (U+7FFFFFFF).

      Up to U+10FFFF, but still.

      You are correct. The final version of UTF-8 was restricted to U+10FFFF, which is sufficient to cover all 17 Unicode character planes, including those reserved for future use. Technically, however, one could unambiguously encode any 31-bit value in one to six bytes via the UTF-8 translation scheme; values above U+10FFFF simply do not correspond to valid Unicode codepoints.

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    16. Re:Because Scala, JRuby, Groovy, Clojure ... by 21mhz · · Score: 1

      Yes, any such code (including text trimming) should work with graphemes, which consist of one or more characters, or, by substitution, a sequence of code units in the encoding. UTF-16 is no worse for this purpose, and may in fact work faster, than UTF-8. But for dealing with individual Unicode characters, such as classification or any algorithms specified to work on this type of input, Java only provides some inconvenient poorly typed APIs, added as an afterthought.

      --
      My exception safety is -fno-exceptions.
  6. i wish by Anonymous Coward · · Score: 1

    this is a non-java-based java killer :)

  7. No need to duplicate work by MrEricSir · · Score: 5, Funny

    We already have a Java killer; his name is Larry Ellison.

    --
    There's no -1 for "I don't get it."
    1. Re:No need to duplicate work by Anonymous Coward · · Score: 5, Funny

      One Rich Asshole Called Larry Ellison.

      Poetic.

    2. Re:No need to duplicate work by causality · · Score: 0

      One Rich Asshole Called Larry Ellison.

      Poetic.

      Someone should mod this up.

      --
      It is a miracle that curiosity survives formal education. - Einstein
    3. Re:No need to duplicate work by ae1294 · · Score: 2

      One Rich Asshole Called Larry Ellison.

      Poetic.

      Someone should mod this up.

      I would but Larry Ellison won't let me...

    4. Re:No need to duplicate work by Anonymous Coward · · Score: 0

      Divine.

    5. Re:No need to duplicate work by CrashandDie · · Score: 1

      Operation: Release All Cash to Larry Ellison.

      Reverse ORACLE, it becomes ELCARO. "Caro" in Spanish means "expensive, dear, costly".

      I won't bother with the letters-to-numbers conspiracy theories. Hint, the company name converted to numbers is roughly equivalent to the Market Capitalisation on a specific day a few years ago... 'T was Mr. Ellison's birthday... His 50th birthday...

    6. Re:No need to duplicate work by Anonymous Coward · · Score: 0

      Larry is strictly a carrion bird. Java was already dead when he got to it.

    7. Re:No need to duplicate work by Life2Death · · Score: 0

      Mod parent up, I see what he did there.

  8. Java killer? by PCM2 · · Score: 4, Insightful

    A "Java killer" that relies on the JVM to run sounds like it's in for an uphill battle.

    Writing an SDK from scratch in a homebrewed language that does everything the Java SDK does? Well, good luck anyway.

    --
    Breakfast served all day!
    1. Re:Java killer? by unity100 · · Score: 2

      Writing an SDK from scratch in a homebrewed language that does everything the Java SDK does? Well, good luck anyway.

      why not ? if enough people decide it is a good idea and participate, it may take much shorter than you can imagine.

      the open source community now knows open source effort works. linux prevailed, firefox prevailed. people have self esteem and faith now, and know the ways to make it work. now, they will make work, whatever they decide to make it work.

    2. Re:Java killer? by PCM2 · · Score: 4, Insightful

      if enough people decide it is a good idea and participate, it may take much shorter than you can imagine.

      Designing and implementing a new programming language that's intended as a direct challenge to Java... by committee... using a distributed development model... "much shorter than I can imagine"? Have you followed the history of Java at all? Or of any language?

      linux prevailed, firefox prevailed.

      And both were written in a language people already knew.

      --
      Breakfast served all day!
    3. Re:Java killer? by Anonymous Coward · · Score: 1

      the open source community now knows open source effort works. linux prevailed, firefox prevailed. people have self esteem and faith now, and know the ways to make it work. now, they will make work, whatever they decide to make it work.

      Sounds like new age self-help for the linux geek.
      You just need enough people wishing for it really hard and the opensource community can make it happen.

    4. Re:Java killer? by ceoyoyo · · Score: 5, Insightful

      A new language that relies on an x86 processor to run sounds like it's in for an uphill battle....

      There's no reason not to use the JVM. It's a highly optimized, widely distributed virtual machine (just like x86 processors are highly optimized, widely distributed actual machines).

      Now Java as a language... leaves something to be desired.

    5. Re:Java killer? by raddan · · Score: 4, Interesting

      My favorite part about the post is that he points to C# as an example of a "good" language, as if C# and Java were not essentially the same language. The JVM actually isn't all that bad-- it's mature, bug-free, and reasonably fast. But that's beside the point-- the JVM is like x86. Nobody* cares about the instruction set; they care about language features, and whether those features work quickly. And both the Java VM and Microsoft's .NET runtime have numerous options: IronRuby for .NET and JRuby for JVM, IronPython for .NET and Jython for JVM, Clojure, F#, yadda, yadda.

      Reinventing the VM is a waste of time. And there are tons of languages to choose from for those VMs. So I don't quite see the point of this. The slides appear to be slashdotted, and just from the post's talking points... yawn.

      * "nobody" here should be read as "very few", i.e., mostly people who write JIT compilers and not people who write enterprise code.

    6. Re:Java killer? by unity100 · · Score: 2

      linux, firefox were developed during at an era when the open source movement was in development itself. tools, methods, issues, were not known.

      now, not only we are mature, but also we have endless number of tools to facilitate distributed development.

      yes, indeed, with the variables given, one thing that is certain is that it would be much shorter than before, to develop an entire language, using the distributed development model now.

    7. Re:Java killer? by tomhudson · · Score: 2, Interesting

      The problem is this doesn't "throw out the things that are flawed in the original java" - quit the contary.

      No âoespecialâ types, everything is an object

      (and TFA loses additional points for using Microsoft's smart quotes as demonstrated above)

      Any experienced c++ programmer will tell you that "classes if necessary, but not necessarily classes" is the way to go. Class explosion is not pretty, and makes for over-complex stupid implementations.

      The new assignment operator ":="

      Oh look, someone revived the Clipper dBASE compiler / Pascal syntax.

      If you REALLY want to fix it, add the things that are missing:

      Kill off interfaces (even James Gosling admits that they were probably a mistake), add multiple inheritance.
      A c/c++ style macro compiler and #include system

    8. Re:Java killer? by dmomo · · Score: 2

      JVM bytecode and Java's language syntax are two very different things.

    9. Re:Java killer? by Tsiangkun · · Score: 1

      Oh yes, that explains the blazing development speed of Perl6

    10. Re:Java killer? by theshowmecanuck · · Score: 1

      Designing and implementing a new programming language that's intended as a direct challenge to Java... by committee...

      We'll be in framework hell before it even gets through a standards committee.

      --
      -- I ignore anonymous replies to my comments and postings.
    11. Re:Java killer? by cakoose · · Score: 5, Insightful

      Any experienced c++ programmer will tell you that "classes if necessary, but not necessarily classes" is the way to go. Class explosion is not pretty, and makes for over-complex stupid implementations.

      When trying to design a new, clean, high-level programming language, I probably wouldn't pay much attention to C++ rules of thumb.

      Making everything behave like an object can make things much cleaner. It all depends on how exactly this is done, but a lot of complexity in Java comes from the fact that primitive types behave differently. C# did a bit better, but there's still the value-vs-class distinction which can trip you up in subtle ways.

    12. Re:Java killer? by jensend · · Score: 5, Insightful

      Kill off interfaces (even James Gosling admits that they were probably a mistake), add multiple inheritance.

      *citation needed*
      Everything I've seen from Gosling says that pure interfaces are the way to go- even to the extent of getting rid of regular inheritance; see these quips. I don't think anybody who's seriously looking at language design thinks C++- style multiple inheritance is a good idea. Nor does anyone want to resurrect the braindead C preprocessor way of dealing with things.

      And what's so bad about :=? The fact that some outmoded languages used it doesn't make it a bad idea. Most of us are familiar with its use as a definition or assignment, and avoiding confusions between = and == could be a plus, especially if (as he seems to propose) the latter is extended to replace use of .equals().

    13. Re:Java killer? by Mongoose+Disciple · · Score: 4, Insightful

      why not ? if enough people decide it is a good idea and participate, it may take much shorter than you can imagine

      I don't think you grasp how much Java stuff is out there already, even open source, and how many years it took to produce.

      Open source isn't like a magical brownie cobbler that fixes your shoes in the night if you leave him a little saucer of milk. Sometimes it duplicates its effort, so to speak, for no good reason but I wouldn't bet on it on a massive scale any more than I'd bet on winning the lottery, except someone actually does typically win the lottery.

    14. Re:Java killer? by cakoose · · Score: 4, Insightful

      My favorite part about the post is that he points to C# as an example of a "good" language, as if C# and Java were not essentially the same language.

      C# started out essentially the same as Java. But at this point it's way better.

      • Function types and closures. This alone makes it way better.
      • More efficient generics (no boxing/unboxing).
      • Local variable type inference.
      • Coming in C# 5.0: automatic CPS transformation (async/await).
    15. Re:Java killer? by Anonymous Coward · · Score: 1

      Oh yes, that explains the blazing development speed of Perl6

      Perl 6 is a case of the exponents overwhelming the proponents (TIMTOWTDI). And every extra way layered upon the last layer of possibly useful, but certainly redundant, ways to do things in Perl, adds to the combinatorial explosion. And BOOM goes the dynamite!

      Hopefully Ceylon will focus on finding one or two "best" ways to do all and only what it must do to compete.

      And who is to say that just because it now needs a JVM to bootstrap, that it always will? "c" needed assembler to bootstrap itself, but once it "arrived" it became possible to extend itself in native "c". Or perhaps Ceylon development may use a JVM as a development environment, but may also become capable of producing runtime objects that do not require a JVM.

      It was only much later in the cycle of that language thread ("c") that exponentiation began to dominate utility, at least in many instances. And that stage we know as C++. And even later, a "stripped down" version, complete with limitations to go along with the complexity pruning. That language was C#...

      These opinions are strictly my own, but that is how it looks, looking back across the decades.

      Good luck, Ceylon project. Oracle is a Goliath, but perhaps you will turn out to be a "David".

    16. Re:Java killer? by unity100 · · Score: 0

      does it ? i coded in perl 10 years ago. since then, i didnt care for it. i moved on to php. it just means that less people are using and willing to contribute to perl, regardless of its usage in scripting for server-side tasks in linux.

      just because you or some others see it as important, does not mean others will too.

    17. Re:Java killer? by functor0 · · Score: 1

      The new assignment operator ":="

      Oh look, someone revived the Clipper dBASE compiler / Pascal syntax.

      No, someone revived the the ALGOL 58 syntax (yes, that is 1958) . Everything old will be new again ...

    18. Re:Java killer? by jjohnson · · Score: 1

      They're using the JVM; they're not aiming at compatibility with the SDK, or being able to run Java code, or run Ceylon code in a J2EE container. That makes the job a lot more manageable.

      It's like sitting down and saying, "given the JVM, what should Java have been like?"

      --
      Anyone who loves or hates any language, platform, or manufacturer, doesn't know what they're talking about.
    19. Re:Java killer? by Anonymous Coward · · Score: 0

      * "nobody" here should be read as "very few", i.e., mostly people who write JIT compilers and not people who write enterprise code.

      What the fuck is "enterprise code"? I've heard this phrase used in so much marketing, but what the hell is it supposed to mean? It doesn't seem to indicate what the actual purpose of the software being developed is at all. Software can be maths heavy, user interface centric, database centric, IO intensive, string processing intensive, graph centric, bare-metal, portable, slow for no reason or highly optimised, but it's entirely possible and quite likely that any "enterprise" presumably meaning a large company, will use and/or develop software that falls into all those categories, and it's somewhat unlikely that one language is used for all those aspects.

      Now it ought to be possible, and maybe one day there will be a language that is generally applicable (and some people think C or Java, or .net is it), but at the current time that doesn't seem that such a language exists, at least in widespread use.

      The only real meaning I can think of for "enterprise" software, is "vendor charges us a lot of money for" software, as there is exactly no reason a company can't use the same software everyone else is using.

    20. Re:Java killer? by tomhudson · · Score: 2
      That brings up another thing that's missing from java - operator overloading. The String class is overloaded, but we can't overload operators (even the + or ==) when it would make sense.

      This is a case of "we don't trust the programmer to get it right", same as the lack of multiple inheritance and the stupidity of interfaces as a work-around.

    21. Re:Java killer? by MightyMartian · · Score: 2

      Having a VM that's not at the mercy of Oracle would, to my mind, be a huge plus. But Oracle's war against Google shows just how fraught with risk that could be.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    22. Re:Java killer? by tomhudson · · Score: 1, Insightful

      Making everything behave like an object can make things much cleaner

      ... but a lot of the time, it doesn't - it just results in having to write a bunch more classes because the language is lacking in basic flexibility - no programmer overloading operators, no multiple inheritance, no preprocessor - because the programmer "can't be trusted." Throw in a non-deterministic garbage collector and finalize methods that, if your program is running for months, may only be called when your program finally exits (really really REALLY dumb move there, people) ...

      .At least in c++, you're guaranteed that when the stack frame is popped as your object goes out of scope, your destructor is called immediately. Well-behaved, provable programs need to be deterministic. Until the gc is fixed, java by definition is not a well-behaved provable environment.

    23. Re:Java killer? by larry+bagina · · Score: 1

      It does use the JVM.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    24. Re:Java killer? by ae1294 · · Score: 1

      The new assignment operator ":="

      Oh look, someone revived the Clipper dBASE compiler / Pascal syntax.

      No, someone revived the the ALGOL 58 syntax (yes, that is 1958) . Everything old will be new again ...

      What do you mean revive it? I still use Turbo Pascal... I mean http://www.freepascal.org/

    25. Re:Java killer? by Desler · · Score: 3, Insightful

      What the fuck is "enterprise code"? I've heard this phrase used in so much marketing, but what the hell is it supposed to mean?

      Horribly bloated code written by mouth breathers who can't grasp any other language than one which doesn't hold their hand the entire way through. Oh and you usually have to throw in a couple of frameworks and then add additional frameworks on top of other frameworks to manage your other frameworks in the process of designing "enterprise" software.

    26. Re:Java killer? by clang_jangle · · Score: 5, Insightful

      now, not only we are mature, but also we have endless number of tools to facilitate distributed development.

      There's some truth to that, but it also reminds me a bit of my eight-year-old neice talking about how different everything is now compared to way back when she was seven. :)

      Starting to show indications of maturity yes. Achieved maturity -- not quite yet I think.

      --
      Caveat Utilitor
    27. Re:Java killer? by Dahamma · · Score: 2

      If you polish a turd enough, sometimes it can disappear completely...

    28. Re:Java killer? by shutdown+-p+now · · Score: 2

      If you REALLY want to fix it, add the things that are missing:
      Kill off interfaces (even James Gosling admits that they were probably a mistake), add multiple inheritance.

      They didn't do that, but they did allow to provide concrete methods with bodies in interfaces, which makes them much more like mixins. This actually takes away most of the problems, since you're only restricted to classes for when you need state, and multiple inheritance for state is almost always a bad idea (in C++ as well). The reason why Java interfaces feel so limited in comparison is because they don't contain any code, thus artificially limiting code reuse.

      A c/c++ style macro compiler and #include system

      Gods, no. If you suggest adding a macro system to the language, at least point to Lisp as the inspiration, not the braindead fuckup that is C/C++ preprocessor. I mean, seriously - the wretched thing that is the latter does not even use the same tokenization rules as the language itself - how much do you have to smoke to design that?

    29. Re:Java killer? by The+End+Of+Days · · Score: 3, Insightful

      Maybe I'm stupid, but how does having everything behave like an object preclude operator overloading, multiple inheritance, or a preprocessor?

    30. Re:Java killer? by shutdown+-p+now · · Score: 1

      They did do overloads, Smalltalk-style - "a+b" is hardcoded as syntactic sugar for "a.plus(b)", and that can be overriden as any other method. This has obvious limitations for cases where operands are of different types, but it does cover the most typical desired cases (Complex, BigNum etc).

    31. Re:Java killer? by Anonymous Coward · · Score: 0

      Reinventing the VM is a waste of time.

      Startup time and memory overhead essentially make the JVM a terrible choice for a ton of applications.

    32. Re:Java killer? by shutdown+-p+now · · Score: 5, Insightful

      My favorite part about the post is that he points to C# as an example of a "good" language, as if C# and Java were not essentially the same language.

      They aren't. C# 1.0 was essentially Java with syntactic sugar, yes (properties, events, delegates, enums, varargs, ...), but syntactic sugar can make a lot of difference in practice for readable and understandable code. It also had some nice parts such as unsigned types, stack-allocated user-defined value types, and raw pointers - all that mostly useful for efficient interop with C libraries, but it's a surprisingly common scenario even today.

      C# 2.0 added iterators (what Python calls "generators" - functions that produce a lazy sequence of values using some nice syntactic sugar), fully typesafe generics (no type erasure), and, most importantly, full-featured closures. A minor addition were nullable value types (unlike Java, you use strongly typed box types like Integer for the same, C# nullable value types are not boxed and therefore do not require heap allocation).

      C# 3.0 added type inference for local variables, array literals, and closure return/parameter types; and sequence comprehensions (rebranded as "LINQ"). Minor additions were tuple-like anonymous types - "new { foo = 1, bar = 2 }"; and array-like literals for arbitrary collection types - "new List<int> { 1, 2, 3 }".

      C# 4.0 added "dynamic" type, which is essentially opt-in duck typing. Another big addition is covariance and contravariance for generic type parameters - making e.g. "IEnumerable<Object> objects = new List<string>()" valid. Minor additions are optional method arguments, and named (what Python/Ruby calls "keyword") arguments when calling methods.

      For comparison, in the same time period, Java has added a half-hearted generics implementation, enums, and vararg methods.

      So, no, they're not the same language anymore.

    33. Re:Java killer? by ceoyoyo · · Score: 1

      Um, didn't bother reading the post I replied to hey?

    34. Re:Java killer? by RzUpAnmsCwrds · · Score: 4, Insightful

      Anyone who wants Java to allow overloading of == clearly has never had to deal with C# code (C# allows overloading).

      The fundamental problem is that people don't understand Java semantics. In Java, equality testing is consistent and efficient: for reference types (everything except primitives), == always means reference equality. And .equals() always means value equality.

      Comparing strings with == sometimes works because the runtime allocates string constants from a pool. So ("A" == "A") evaluates to true because they reference the same object. But ("A" == new String("A")) evaluates to false.

      The key here is that object variables in Java are *always* references. That's why any object reference can be null, and it's why you can't compare them with ==.

      The problem with overloading is that it's not consistent. Some C# objects overload ==, some don't. There's also ".Equals()", which always checks for value equality. There's also the static method Object.ReferenceEquals(), which always checks for reference equality.

      So you end up with this trap where you either end up using Equals() all the time (as you do in Java), or you have some code that uses Equals() and some code that uses ==. Which doesn't make sense.

      Java is about consistency and predictability. Having operators do different things in different contexts results in neither.

    35. Re:Java killer? by Anonymous Coward · · Score: 0

      Spot on, framework over framework over framework over framework. A request to an "enterprise" app goes through a stack maybe +150 calls deep just to answer a simple request, and then 2-3 more for your actual app.

    36. Re:Java killer? by Tumbleweed · · Score: 2

      Open source isn't like a magical brownie cobbler that fixes your shoes in the night if you leave him a little saucer of milk.

      Yeah, that would be bizarre, rather than cathedral, I guess. The church frowns on the wee folk.

    37. Re:Java killer? by degeneratemonkey · · Score: 5, Insightful

      I absolutely hate Java, and I rather like C++, but I take serious issue with your ignorant, intolerant ranting...

      1. GC implementation is not a language feature, it's a runtime feature. This has nothing to do with Java as a language. Furthermore, any sufficiently complex C++ program implements some form of (at least) semi-automated garbage collection; even if it's just reference-counting smart pointers. You apparently have no experience writing real software.

      2. Really though, are you seriously arguing against non-deterministic GC because you think every program in the universe should be "well-behaved" and "provable" (on your own terms)? We might as well toss out, gee, I dunno, almost every modern language under the sun while we're at it. I think I can count on one hand the number of languages in regular, widespread use today whose standard runtimes leave memory management exclusively up to the programmer.

      3. If you're really going to go down the "provable" road, you'd better throw away your C++ compiler too. Without referential transparency, C++ is practically useless as a language that facilitates "well-behaved" and "provable" code. Haskell for you.

      4. "Class explosion?" This sounds like a term that would be used by a C programmer who writes C code inside of C++ classes, but who doesn't actually design object-oriented programs. "Classes if necessary, but not necessarily classes" would be exactly the kind of tripe I would absolutely never expect an experienced C++ programmer to say.

      5. Meta-language (preprocessor/macros) is not language. Similar to point #1 in that it has nothing to do with the language itself. You could build a simple preprocessor for Java code if you felt so inclined (there are a small number out there already). It's a separate tool though. #define is not part of the C++ language in any way. It's part of the CPP language.

      6. Kill off interfaces? No. What? I see problems with interfaces, but as a general idea they are not something to be killed off. Rather, I'd like to see the adoption of a more flexible "interface" system much like Go's. And multiple inheritance doesn't even make sense unless you like your objects to be schizophrenic, but please see point #4. The part about not understanding OOP.

      7. Finally, you're cutting into a language like Java, while strongly defending an equally flawed language like C++. From your ranting it seems as though you don't understand either one (or many other languages, for that matter) well enough to comment on them. Yet here you are, vomiting invective upon the weary masses of Slashdot.

      8. *Smack* Now go read something and stop face-rolling your keyboard. Thanks.

      Oh and on-topic. Ceylon sounds interesting. I'll play with it. "Killing" Java will require billions of dollars though.

    38. Re:Java killer? by Anthony+Mouse · · Score: 1

      It seems to me the problem is that Java has annoying treatment of references. I mean what's wrong with this?

      void fn(foo &a, foo &b)
      {
                      if(a == b) // compare by value
                      if(&a == &b) // compare by reference/address
      }

    39. Re:Java killer? by codepunk · · Score: 0

      Deep down it is still java, with a couple of features thrown on top like generics, iterators, and the ability to only "run on a windows platform". What a fantastic improvement!

      --


      Got Code?
    40. Re:Java killer? by Anonymous Coward · · Score: 1

      Add macros so we can wave goodbye to compile to time type checks (the most basic one being used in Eclipse). You can read more than 100 papers that tired to introduce static type checks (constructs and constraints) and program transformations to C++. But thanks to macros, these ended up being so hard that everyone moved to Java (or simply put no macro restriction to C++). Even a survey paper from 2010 on program transformations says that full support (i.e. with macros) for C++ is work in progress (lists a bunch of approaches that hack the compiler to add information to the syntax tree where the macro is, or on the fly approaches that add the macro to the grammar of the language).
      Today static type checking has moved so forward thay you can ensure constraints (you cannot call this function with a=null) at compile time. Guess what, all of these don't work when there are macros. Programming is not only done in emacs (or nano or notepad or name your own editor) there are things like model transformations, aspects, static type checking that are also used and are all in state of the art software engineering literature.

    41. Re:Java killer? by xtracto · · Score: 1

      But IIRC from the last book I have read (Effective Java) the Java VM has some limitations itself. That is the reason why a lot of the new Java language enhancements (in 1.5), such as generics, have to be dealth with at *compile* time by type erause (e.g., the JVM does not know anything about the Generics).

      IMHO the real Java killer will be C#. Although I myself prefer Java due to the amount of free/open-source libraries available.

      --
      Ubuntu is an African word meaning 'I can't configure Debian'
    42. Re:Java killer? by inglorion_on_the_net · · Score: 2

      Now Java as a language... leaves something to be desired.

      So does the JVM, though, at least as a target for languages that aren't Java. The primitives you get were clearly designed with a language like pre-1.5 Java in mind. Try to build a more flexible language, and they get in the way. That doesn't mean it can't be done, it just means "highly-optimized" won't be as helpful anymore. I haven't yet read enough about Ceylon to judge whether it will run into trouble here, though.

      --
      Please correct me if I got my facts wrong.
    43. Re:Java killer? by Vectormatic · · Score: 1

      A mod point, a mod point, my IBM JDK for a mod point!

      Just to add in, if you want any kind of a clear language, PLEASE forget about multiple enheritance. I've seen a language which did it (Intersystems Cache, dreadfull), and in conflicting enheritance situations, the actual implementation for a method which gets called is the one from the first class after "extends". how that is supposed to help anyone, i'll never understand.

      It also allows you to royally screw up the one purpose per class best practice, in ways never seen before, hello god object!

      --
      People, what a bunch of bastards
    44. Re:Java killer? by inglorion_on_the_net · · Score: 1

      You seem convinced that the JVM is a good platform for a new language. I am not so convinced. Last I looked at the JVM, it was very much geared towards Java (pre-1.5 Java, that is). That may be ok if that's what you need for the language that you are implementing. However, if the language you implement is like what you already have, what is the point?

      If we look at more interesting languages, they are likely to not fit the JVMs primitives. So while I agree with you that reinventing things we already have is a waste of time, I think the greater waste of time here is (1) reimplementing lots of things we already had outside the JVM inside the JVM and (2) implementing the same workarounds over and over when targeting languages to the JVM.

      You say: "they care about language features, and whether those features work quickly." That is correct, and it is exactly why we do care about the instruction set: most real machine instruction sets are things we can and know how to work with. The JVM has always had limitations (although my understanding is that they are now beginning to be addressed) in what could be efficiently implemented on it.

      --
      Please correct me if I got my facts wrong.
    45. Re:Java killer? by roalt · · Score: 2

      The new assignment operator ":="

      Oh look, someone revived the Clipper dBASE compiler / Pascal syntax.

      This is called the becomes operator. I think it was introduced by Dykstra, a well-known computer science professor. The idea is that it is mathematical more correct than the equals (=) operator, as you can do: x := 3; x := 4; Personally, it's not my favourite (I prefer =), but I do think that it leads to less if(a = b) { ... } mistakes than using the = and == operators from the C language

    46. Re:Java killer? by SplashMyBandit · · Score: 2

      Java deliberately avoided operator overloading as it caused horrific problems with C++ programs. Apart from simple cases you could never trust that someone had overloaded the operator to make it work like you thought - you had to laboriously understand each and every place where an operator was used. Operator overloading was a good idea that turned out to be terrible in practice.

    47. Re:Java killer? by SplashMyBandit · · Score: 2
      C# may be a good language but its libraries are truly awful in the sense they're simply not available everywhere (Mono's libraries are missing major chunks of functionality compared to the Microsoft set).

      Despite the supposed language shortcomings of Java (often criticised by those writing smaller programs or who don't realise that features like 'operator overloading' were deliberately omitted as practical experience showed them to be problematic) the language isn't that bad (especially if you have a large team of people with differing skill levels working on a projetc). The real clincher is that the Java libraries (including 3rd-party) and library portability make Java without peer. This is why Java is still King of the Hill in the Enterprise, and likely to stay there for the foreseable future.

    48. Re:Java killer? by Eivind · · Score: 1

      C++ ain't really a good comparison-point for making a new clean object-oriented language. C++ is aproximately the thing its name indicates - C, but with object-oriented stuff bolted on, in a fairly ugly manner at that.

      If you use instead, as comparison-point, some modern language that does support OO in a clean way, you'll tend to find that "everything is an object" is fairly common. That's the case in both Python and Ruby, for example.

    49. Re:Java killer? by Anonymous Coward · · Score: 0

      "Like Scala", is (one) correct answer. :)

    50. Re:Java killer? by phantomfive · · Score: 1

      They aren't. C# 1.0 was essentially Java with syntactic sugar, yes (properties, events, delegates, enums, varargs, ...), but syntactic sugar can make a lot of difference in practice for readable and understandable code

      If you can't write readable code in Java, you're not going to write it in C#, and the syntactic sugar is likely to make it worse.

      The primary difference between Java and C# is the quality of the libraries available, which is why scalable server apps are not typically written in C#, and GUI apps are much nice when written in C#. You'll never hear anyone say, "Oh, I decided to write X app in C#/Java because of delegates." Other considerations are much more important.

      --
      "First they came for the slanderers and i said nothing."
    51. Re:Java killer? by 19061969 · · Score: 1

      lol! Wish I had mod points for you

      --
      bang goes my karma... again...
    52. Re:Java killer? by Anonymous Coward · · Score: 0

      Are you joking? If
      List = new List();
      is allowed than game over. It has nothing to do with covariance. It's just stupid language design.

    53. Re:Java killer? by Anonymous Coward · · Score: 0

      C# has UNSIGNED integers.

    54. Re:Java killer? by Robert+Gadling · · Score: 1

      Yeah: deep down C is just machine code with a couple of features such as a readable syntax thrown on top... What a fantastic improvement!

    55. Re:Java killer? by shutdown+-p+now · · Score: 2

      Deep down Java is just Simula with a few keywords replaced.

      Ultimately, of course, deep down everything is either Algol-60, FORTRAN or Lisp.

      The point is that idiomatic C# today looks very unlike idiomatic Java, due to the presence of major game-changing features such as concise closures. That's what matters.

      the ability to only "run on a windows platform".

      apt-get install mono

    56. Re:Java killer? by RzUpAnmsCwrds · · Score: 2

      Java vastly simplifies a whole ton of conventions by making every object variable a reference.

      Everything in Java is passed by value. And every object variable is a reference.

      The value of Java is that the designers know how to say "no". Adding more features to a language dramatically increases the chances that code will do something unknown or unexpected. No language is free from that sort of mistake, but Java is significantly more consistent and predictable than most languages.

    57. Re:Java killer? by xski · · Score: 1

      The new assignment operator ":="

      Oh look, someone revived the Clipper dBASE compiler / Pascal syntax.

      No, someone revived the the ALGOL 58 syntax (yes, that is 1958) . Everything old will be new again ...

      All of this has happened before and all of this will happen again...

    58. Re:Java killer? by shutdown+-p+now · · Score: 2

      Language features alone don't decide such things, yes. But when language features are sufficiently big that they change how libraries are written (examples: closures, attributes/decorators, LINQ), then the difference in libraries can certainly be a major factor in choosing a platform. ASP.NET MVC is infinitely nicer than old WebForms not just because it builds around a saner concept, but because it heavily uses what the language has to offer to allow for concise yet readable code with minimal time waste. Another similar example for another language is Rails, where a lot of flexibility and convenience of the framework stems directly from the power of the underlying language

      As for syntactic sugar - the difference between "foo.getLength(foo.setLength() + 1)" and "foo.Length += 1" is minor, but it is there, and it all adds up.

    59. Re:Java killer? by gbjbaanb · · Score: 2

      Making everything behave like an object can make things much cleaner

      In a perfect world probably. But have you considered that there's a reason why primitive types are left as primitives even in C# (which had the opportunity to correct the mistakes Java made).

      Primitives are kept because they are fast, and objects are blinking slow. You don't notice this when you use a relatively few objects, even then because they contain primitives themselves. Turn those into nested object hierarcies (as you'd get if even an int was an object) and your app'd run slower than 1.0 Java in an interpreter on a 200Mhz machine!

      that's the main reason, there's also another case that objects everywhere don;t necessarily make for maintainable programs, in theory yes, but in practice call stacks like spaghetti is seen too often.

      If you want to clean things up, then altering the concept of an object is probably what's needed - you want to separate data from functionality, so your data can be small and tight; then you need a nice way to associate methods with the data. Classes do it at the moment in a particular way, but there's no reason why the compiler cannot do it a different way under the covers.

    60. Re:Java killer? by Anonymous Coward · · Score: 0

      now, not only we are mature, but also we have endless number of tools to facilitate distributed development.

      There's some truth to that, but it also reminds me a bit of my eight-year-old neice talking about how different everything is now compared to way back when she was seven. :)

      Starting to show indications of maturity yes. Achieved maturity -- not quite yet I think.

      Well, if not now, when? Let anyone eager try, and fail if they will or succeed if they will. Eventual success will be the only indication that it was, indeed, the time!

    61. Re:Java killer? by gbjbaanb · · Score: 1

      but we can't overload operators (even the + or ==) when it would make sense ... same as the lack of multiple inheritance and the stupidity of interfaces as a work-around.

      And anyone who thinks the lack of the above features is a good thing should pack it all in and become a VB programmer, so not to hurt themselves.

    62. Re:Java killer? by cakoose · · Score: 2

      In a perfect world probably. But have you considered that there's a reason why primitive types are left as primitives even in C# (which had the opportunity to correct the mistakes Java made).

      I'm not suggesting that primitive types be implemented using the mechanics of regular objects. I'm just saying that they could be made to appear to the programmer like regular objects. Combined with certain restrictions (e.g. no extending from primitives) and some compiler tricks, this can be made to work efficiently. The fact that Java's primitive types are all immutable makes this even easier -- immutable objects are very well-behaved.

      And sure, your performance might suffer if you're not careful, but I don't think that's necessarily worse than having to force people to deal with the primitive/object difference even when they don't particularly care. It's kind of like the autoboxing situation today. If you're not careful you could end up with a bunch of unwanted boxing/unboxing operations. So when I need to be careful, I am. But when I just want to get something done, it's way easier to just let the autoboxing happen.

    63. Re:Java killer? by m50d · · Score: 1

      The fundamental problem is that people don't understand Java semantics. In Java, equality testing is consistent and efficient: for reference types (everything except primitives), == always means reference equality. And .equals() always means value equality.

      As you allude to, primitives completely break the model. You compare for equality using .equals, except when it's a primitive in which case you have to use == because .equals doesn't exist. If you use == with strings, or other objects, it will sometimes work, and then break occasionally and surprise you. Allowing overloading of ==, so that == would always check for value equality, would let you write consistent code that looked the same for primitive types and objects, and make the common case (because you almost never want to do a reference equality comparison) look much nicer. Of course there's the problem of ensuring it's implemented consistently, but I'd do that by making it an optional interface, just like the new for loop syntax; objects that want to be equality comparable implement EqualityComparable (whose documentation clearly states that it should implement value equality), and you simply cannot write == for objects that aren't EqualityComparable.

      --
      I am trolling
    64. Re:Java killer? by AnonymusCowMoo · · Score: 1

      Too bad you didn't write "List objects = new List()" that would have been A LOT more fun.

    65. Re:Java killer? by n+dot+l · · Score: 3, Insightful

      It's been ages since I worked with Java, but even if I hadn't been hearing for years how far Java's come since the bad old days, I'd feel compelled to call you on some of this bullshit...

      A note before I start: I mostly work on video games, and I use a mix of C++ (engine), C# (custom build tools, editors, etc), various scripting languages (Lua, Python, etc: some embedded in the engine, others for automating aspects of the build). I've also written the odd business app in C# and, way back when, Delphi.

      it just results in having to write a bunch more classes because the language is lacking in basic flexibility

      On the contrary, one often wants simple values to behave like objects, such as when one wishes to declare groups of arbitrary values for serialization or the like. Having the compiler or runtime autogenerate an object version of your value types and provide a simple syntax for converting between the two forms is a huge time saver and spares one from writing a lot of tedious code.

      it just results in having to write a bunch more classes because the language is lacking in basic flexibility

      It also lacks the diamond problem. I mean, yeah, a competent programmer can work around that, sure. A competent programmer can also structure his code such that it doesn't require MI, without needlessly complicating anything.

      no preprocessor

      Nothing stops you from using C's (or any other) preprocessor with Java (or any other compiler that takes text files as input). That's where C++'s preprocessor (which most good C++ programmers recommend avoiding) came from, you know. Actually, in the bad old days, C++ itself was a preprocessor...

      because the programmer "can't be trusted."

      Because a programmer writing business apps has more interesting things to think about than making sure that his colleague remembers that foo() returns an object out of a memory pool which shouldn't be deleted or referenced beyond the end of the current transaction, whereas bar()'s return needs to be freed by returning it to a free list, and whether he can afford to pay the extra allocations and cache misses necessitated by returning shared_ptr wrappers that remember that for his colleague, or whether it's time to sit down and write two whole new pointer-wrapping classes (and if those wrappers use a reference count, should we put it in the object or allocate that from some special pool...), or whether he should return raw pointers and make a note to spend a few minutes during every future code review checking that they're not being misused...

      Wait, where did shared_ptr come from? Why am I thinking of writing classes to wrap pointers? I just want to return a dynamically allocated object! What happened to not writing extra classes?

      Throw in a non-deterministic garbage collector

      The GC is, like all other software, entirely deterministic - in exactly the same way that malloc/free and new/delete's continue to behave deterministially when the heap becomes fragmented. The phrase you're looking for is "as strictly defined as my arbitrarily chosen reference point". Millisecond stalls at unspecified intervals to transparently collect garbage are entirely within the definition of well-behaved for a very large class of software.

      At least in c++, you're guaranteed that when the stack frame is popped as your object goes out of scope, your destructor is called immediately.

      And a language in which 95% of objects don't hold non-garbage-collected resources doesn't need destructors, let alone deterministic ones. The other 5% have a method called something synonymous with "close" on them, and competent programmers remember to call those functions, just as you remember to call (or write/use a class which will call) delete or free on the 95% of objects whic

    66. Re:Java killer? by shutdown+-p+now · · Score: 1

      Can you explain why it is "game over"? I would be particularly interested in hearing an explanation that does not involve variance.

      As a side note, you changed the code. In my post it was:

      IEnumerable<Object> objects = new List<string>()

      which is very different from yours:

      List<Object> objects = new List<string>()

      which might, in fact, explain your difficulty
      (hint: IEnumerable does not have Add, nor does it provide other way to insert a new element into the collection)

    67. Re:Java killer? by shutdown+-p+now · · Score: 1

      Too bad you didn't write "List objects = new List()" that would have been A LOT more fun.

      Sure it would; and proper handling of variance for generic type parameters - as seen in C# - makes sure that it won't compile, while what I actually did write will. So type safety is fully preserved - you can "upcast" generics, whether implicitly or by an explicit cast, only where it's actually safe to do so.

      (an AC who made another reply to this post of mine was apparently confused by just this very thing, in fact)

    68. Re:Java killer? by Rockoon · · Score: 1

      And anyone who thinks the lack of the above features is a good thing should pack it all in and become a VB programmer, so not to hurt themselves.

      Even VB supports operator overloading these days. Seriously..

      --
      "His name was James Damore."
    69. Re:Java killer? by Anonymous Coward · · Score: 0

      Or you do what Python does and have "is" for referential equality and "==" for value equality. But that would surely be too easy...

    70. Re:Java killer? by Broolucks · · Score: 1

      The simple solution is to make "a == b" syntactic sugar for "a.equals(b)", and maybe "a === b" syntactic sugar for "a.referenceEquals(b)" (I know how ugly it looks). In that case, overriding the equals method would always also overrides ==, by definition. Incidentally, this is exactly what Ceylon is doing.

    71. Re:Java killer? by kaffiene · · Score: 2

      JRuby is one of the fastest Ruby implementations. Scala is very very fast. Closure is a very fast and increasingly popular Lisp. It seems like plenty of people are getting other languages implemented efficiently on the JVM.

    72. Re:Java killer? by Anonymous Coward · · Score: 0

      > But at this point it's way better.

      "Way ahead" or "much better" are grammatically correct, but not "way better".

    73. Re:Java killer? by Broolucks · · Score: 1

      I wish the left-pointing arrow was an ASCII character and/or standard on a US keyboard. It would be the perfect assignment operator :(

      Well, I guess a language could use <-, but it's awkward.

    74. Re:Java killer? by kaffiene · · Score: 2, Insightful

      The LAST people in the world I would ask for advice on programming language design would be people who think that C++ is a good language. That's like asking the blind for help with the colour scheme for your house.

      Consistency is good which is why everything being an object is good. You can treat 'primitives' as being classes in terms of the language design while still implementing them as primitives in VM/byte code for optimisation purposes. Special cases / Corner cases are bad.

      Multiple inheritance is the devil's spawn. The diamond pattern deserves it's own special level in hell. Interfaces are better - may I point out that Smalltalk used single inheritance with interfaces - so Java is much MORE traditionally OO in that regard than C++... but I digress. Mixins/traits are a much better solution still and are, I believe, the only solution a sane OO language designer should use these days.

    75. Re:Java killer? by rbrausse · · Score: 1

      urpmi apt && apt-get install mono

      small fix :)

    76. Re:Java killer? by kaffiene · · Score: 2

      Jesus wept. You're seriously just saying that Java would be better if it was C++?

      I've programmed professionally for both of those languages for a number of years. Java became wildly successful mainly because it was an alternative to steaming piles of shite like C++. I have no doubt that Java will be superseded eventually - perhaps by Scala - but definitely not by going back to C++.

    77. Re:Java killer? by Broolucks · · Score: 1

      As far as I can tell, Ceylon uses = to initialize immutable variables, and := to assign to mutable variables, so I doubt it really avoids any confusion.

      I do like the idea of making syntactic distinctions between immutable and mutable variables, though. It can make code easier to read, when you can assume that some variables won't change and others probably will, especially in large function bodies.

    78. Re:Java killer? by kaffiene · · Score: 1

      TL;DR : It ain't you who is being stupid

    79. Re:Java killer? by kaffiene · · Score: 2

      It's amazing that Scala manages to be blazingly fast, then, given that it's primitives are all classes. Maybe you should tell them that they;re obviously doing it wrong.

    80. Re:Java killer? by angel'o'sphere · · Score: 1

      I hope you don't program much in Java ...

      if your program is running for months, may only be called when your program finally exits (really really REALLY dumb move there, people) ..

      Finalizers are not called on program termination. They only get called when the garbage collector collects an object ...

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    81. Re:Java killer? by Anonymous Coward · · Score: 0

      Um, didn't bother reading the post I replied to hey?

      Use the blockquote tags - not all people view Slashdot comments in a hierarchical view, nor do they like scrolling up ten pages to find that post even when they are.

    82. Re:Java killer? by kaffiene · · Score: 3, Insightful

      Operator overloading, like many C++ features, is great until you have to code with other people.

    83. Re:Java killer? by kaffiene · · Score: 1

      meh. the compiler can catch if (a=b). Java does. GCC can.

    84. Re:Java killer? by tomhudson · · Score: 1
      You missed my point - instead of coming up with YAJV (Yet Another Java Variant) that, contrary to what people seem to think, does not replace java or the jvm, just adds some syntactic sugar, they could have addressed the real issues.

      Job #1 would be to fix finalizers. They've been broken since day 1. Everyone knows they're broken. Everyone ignores it ...

      Adding any and all the other things would also be nice. Its not like it would FORCE anyone to use any of those features, but for those who want them, they'd at least be there. C++ has had them for decades. Javanistas say "operator overloading is bad" - and yet they don't complain about + being overloaded for Strings. Willful blindness or hypocrisy - take your pick.

    85. Re:Java killer? by tomhudson · · Score: 2

      Everything in Java is passed by value. And every object variable is a reference.

      Those two statements are mutually exclusive :-)

      Objects are passed by reference, which means that NOT everything is passed by value. Only the reference to the object is passed by value :-)

      Adding more features to a language dramatically increases the chances that code will do something unknown or unexpected. No language is free from that sort of mistake, but Java is significantly more consistent and predictable than most languages.

      Both the garbage collector and finalizers are unpredictable. You are never guaranteed as to when the garbage collector is run, and finalizers thus may not be called until your program terminates - and in fact finalizers may never be called.

      This is one of the reasons why, even after so many years of saying that they'd come out with a jvm that can handle multiple programs at once, they haven't - it's been totally abandoned because the jvm needs to terminate so the OS can reclaim resources that the jvm failed to release because the gc and finalizers are both broken.

      Now, in c or c++, the startup library is tiny - around 3k. It sets up the memory arena, the program environment variables, a bit of housekeeping, then jumps to main. The startup library for your java program is the entire jvm instance that has to be loaded into memory. This is not a fixable problem.

    86. Re:Java killer? by gbjbaanb · · Score: 1

      but you are suggesting that regular objects be implemented using the mechanics of primitive types :)

      autoboxing et al are just hacks, if the langugaes had a decent generic system (eg like C++s) then autoboxing would not be needed (and I doubt anyone uses it now that C# has a generic feature)

    87. Re:Java killer? by angel'o'sphere · · Score: 1

      I programmed from 1989 to roughly 2001 in C++, I never saw a "wrong" overloaded operator.

      I think those stories about wrong overloaded operators are just myths ... buggy overloaded, yes, that I believe. Funny overloaded, likely. But intentionally wrong by a programmer who makes a living from it or is working in a big organization, I don't believe that.

      OTOH perhaps I just had luck ;D

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    88. Re:Java killer? by tomhudson · · Score: 1
      Multiple inheritance in c++ has always called the constructors in the order they're listed.

      You can always specify which parent class's method to invoke via the :: scope resolution operator (double-double colon, aka the "Tim Hortons" colon). No ambiguity need exist.

      To refresh your memory ....

    89. Re:Java killer? by tomhudson · · Score: 1

      That's not true operator overloading. Programmers should be able to define the overloads they want for all operators.

    90. Re:Java killer? by tomhudson · · Score: 1

      And in the end, who cares about stati type checking of macros? Really ... it's a tool. If you can't use the tool without accidentally cutting yourself, then it's not the tool for you. Admit it and move on, instead of complaining about how "evil" it is because you can't keep track of the type for a variable and need compile-time checking. Bets are that the people who wrote the operating system you're using used macros.

      ... call me back when java is self-hosting, instead of being written in c or c++, because I'm looking at the source, and it sure isn't written in java. Operator overloading, memory management, and macro pre-processing are not evils, just not for everyone. For those of us who know how to use them, there's c and c++. For everyone else, there's java and other interpreted languages.

    91. Re:Java killer? by tomhudson · · Score: 1

      I can believe that some time, somewhere, someone may actually have overloaded an operator unnecessarily for "completeness" - and then that bit somebody else. But for those of us who write our own classes instead of being dependent on the STL or TR1, and learned how to properly manage our own memory instead of needing "smart pointers", operator overloading is just another arrow in the quiver.

      Certainly it can't be that bad, if even Java overloads the + operator for Strings. Or is the javanista horde too unwilling to admit both their blind hypocrisy and that Java is dumbed-down for its' audience for a reason?

      Java programmer: "I like that I can depend on the Java garbage collector."
      c/c++ programmer: "Maybe you should just stop filling your programs with garbage"?

    92. Re:Java killer? by SoupIsGood+Food · · Score: 1

      It's just Smalltalk on JVM. Smalltalk evangelists are as deranged as Lisp evangelists - only the Smalltalkers are also laboring under the delusion that their language is the most intuitive and easy; so easy, children should learn it! To see this philosophy in action, check out the Squeak environment. It's smalltalk in microcosm: Massively powerful, but a syntactic, disorganized mess.

      This has about as much chance of dethroning Java as Clojure. But it's going to be nice for the smalltalkers, who despite their derangement, tend to be immensely talented programmers. (I think it's a matter of a certain mindset meeting its ideal tool, rather than the tool creating the mindset.)

    93. Re:Java killer? by tomhudson · · Score: 1

      C++ ain't really a good comparison-point for making a new clean object-oriented language. C++ is aproximately the thing its name indicates - C, but with object-oriented stuff bolted on, in a fairly ugly manner at that.

      1980 called - they want your meme back. Yes, it dates back that far ...

      C++ used to be just c and a hacked-together pre-processor to add classes (CFRONT C++ is now supported directly in the compiler, and has been for decades. There's nothing wrong with multiple inheritance that a day sitting down and having it explained properly to the people who b*tch and moan about how evil it is won''t cure.

      Same as, if operator overloading is supposedly so evil, why does even Java do it with Strings? You can't have it both ways.

    94. Re:Java killer? by tomhudson · · Score: 1

      In deterministic programs - no, I meant all java programs are potentially non-deterministic. Finalizers are not guaranteed to ever execute, for example, so you have code in your program that looks fine, but depending on the runtime environment, the implementation, resources available at the moment, the time of day or phase of the moon, may be effectively turned into dead code.

      The so-called "diamond problem" is pretty much a boogie-man

      It usually happens when people try to make too deep and comprehensive and deep a class hierarchy. The whole "stupid frameworks for stupid people" thing ...

      The :: scope resolution operator isn't that hard to use, if you don't want to bother with virtual functions.

    95. Re:Java killer? by tomhudson · · Score: 1

      The LAST people in the world I would ask for advice on programming language design would be people who think that C++ is a good language. That's like asking the blind for help with the colour scheme for your house.

      By the same token, the last people who should be asked about language design would be those who don't understand the benefits of multiple inheritance over single inheritance, or overloading operators, or finalizers that should actually be guaranteed to run at some point instead of sometimes turning into just so much dead code because the garbage collector said "Sorry, honey, not this run. Maybe next time" because they lack the ability to think outside their tiny little box :-)

      BTW - what language is Java written in? Hint - it's the language you're throwing rocks at as being so terrible. Isn't that being just a teeny bit hypocritical?

      Just as c spawned c++, there's no reason why java can't learn how to do multiple inheritance, programmer-definable operator overloading, and deterministic garbage collection (even if the latter only means that the programmer is given the authority to manage memory manually for those classes they so mark.)

      C and C++ programmers solved these issues back in the '80s. Here we are, 30 years later, and Java won't even try to address them.

    96. Re:Java killer? by cakoose · · Score: 1

      All I was saying is that "class explosion", whatever that is, doesn't always trump the benefit of making similar things appear similar. Autoboxing is needed less often in C#, but it's still needed because all types are subtypes of "object".

    97. Re:Java killer? by ObsessiveMathsFreak · · Score: 1

      The fundamental problem is that people don't understand Java semantics. In Java, equality testing is consistent and efficient: for reference types (everything except primitives), == always means reference equality.

      Heh!

      --
      May the Maths Be with you!
    98. Re:Java killer? by moonbender · · Score: 1

      Now you introduce being self-hosted and being used for operating systems development as new measuring sticks? You're starting to rival apk in your argumentative "flexibility". And stop making language discussion into a willy waving contest. Do you really crave recognition that much that you constantly, publicly need to pat your own back?

      --
      Switch back to Slashdot's D1 system.
    99. Re:Java killer? by microbox · · Score: 1

      A c/c++ style macro compiler and #include system

      Sadist.

      D went the right route with that one. But if you want to write your own code structures, then Lisp/Scheme beats the macro compiler hands-down.

      --

      Like all pain, suffering is a signal that something isn't right
    100. Re:Java killer? by tomhudson · · Score: 1

      I hope you don't program much in Java ...

      if your program is running for months, may only be called when your program finally exits (really really REALLY dumb move there, people) ..

      Finalizers are not called on program termination. They only get called when the garbage collector collects an object ...

      ... and the garbage collector may NEVER "collect" the object, even upon program termination, which is why, by the same token, I should be able to say that I hope YOU don't program much in Java, if you didn't even know that.

      c++ destructors work. Java finalizers, obviously not so much. The garbage collector in java is conceptually flawed. Rather than having it happen at runtime, perhaps it's time that java was re-worked so that proper destructors can be injected into the emitted byte-code stream when the source is translated into the bytecode classes that the interpreter will interpret? Or maybe optionally have a compile-time switch to get rid of the byte-code interpreter and virtual machine entirely and emit native code?

    101. Re:Java killer? by GooberToo · · Score: 1

      You beat me to it. So glad you clarified that. Aside from minor nits and this key correction, largely everything else he said is stop on.

    102. Re:Java killer? by angel'o'sphere · · Score: 1

      Erm ...

      ... and the garbage collector may NEVER "collect" the object, even upon program termination, which is why, by the same token, I should be able to say that I hope YOU don't program much in Java, if you didn't even know that.

      That is why I wrote my statement before, lol.
      C++ destructors and Java finalizers serve different purposes anyway.
      Regarding your other answer to one of my posts: I also wrote my own STL in 1992 or something, perhaps 1993/1994. So your if answering to my posts means you think I'm an Java idiot, then my apologizes to have sold myself to badly.

      However your comments regarding Java, and its garbage collector e.g. indicate you don't know much about Java.

      E.g. Java Bytecode is JIT compiled during runtime to native code anyway. As I said above, finalizers and destructors serve different purposes. Regarding your other post again: ofc I would love to have operator overloading in Java ... thats why I program mainly in Groovy meanwhile and in Scala. In fact I would love to have a "streamlined" C++ for the JVM.

      If you want to read up the difference between finalization and destructors, check why .NET C++ has both.

      Regards

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    103. Re:Java killer? by TheSunborn · · Score: 1

      How does c# then handle this:

      Enumerable<String> objectsA = new List<string>()
      Enumerable<Object> objectsB = objectsA;
      objectsA.add(42); // Will this give an exception, because the list was allocated as List<String>?
      String myString=objectsA.get(0); // Or will this cause a class cast exception, trying to convert 42 to a string?

      There newer seems to be a good way to handle this, which is why neither Java nor c++ allows it.

      But yes java miss a lot of features which c# have, but it seems like they are comming with java7 and 8, which is good for us still developing java. (Except for delegates which still seems to be missing, so writing gui code with that fucked up callback system based on interfaces and unnamed objects is still going to suck).

    104. Re:Java killer? by RalphTheWonderLlama · · Score: 1

      Wow, where did you get Perl 10?

      --
      simple, fast homepage with your links: http://www.ngumbi.com/
    105. Re:Java killer? by Anonymous Coward · · Score: 0

      linux prevailed, firefox prevailed. people have self esteem and faith now, and know the ways to make it work. now, they will make work, whatever they decide to make it work.

      This word "prevailed", I do not think it means what you think it means.

      Linux and Firefox would not be in wide use today without companies that pay programmers to work on them. IBM and Red Hat come to mind for Linux. Over 80% of Mozilla's income is from Google*. What company do you see funding "Java, but not Java"?

      *: http://www.technobuffalo.com/internet/how-does-the-mozilla-foundation-make-money/

    106. Re:Java killer? by Anonymous Coward · · Score: 0

      meh. the compiler can catch if (a=b). Java does. GCC can.

      The compiler only catches "if (a=b)" because Java requires the contents of the if() to evaluate to a boolean, whereas an assignment evaluates to the result of the assignment. If a and b just happen to be booleans, the compiler won't catch it.

    107. Re:Java killer? by Anonymous Coward · · Score: 0

      now, not only we are mature, but also we have endless number of tools to facilitate distributed development.

      Have tools ever been the bottleneck? The problem with every large software effort I have been involved in (three closed, two open) is finding people wiling to work on the tedious and borring parts of software development. If you don't pay someone to write good docs, fix obscure bugs, and make sure backward compatibility is preserved, it doesn't happen. Even if you do, the people who are competent will leave if they are not promoted into less tedious roles after a few years.

    108. Re:Java killer? by npsimons · · Score: 1

      Having a VM that's not at the mercy of Oracle would, to my mind, be a huge plus. But Oracle's war against Google shows just how fraught with risk that could be.

      Maybe Oracle's war against Google is /precisely/ why RedHat is developing their own VM. Besides, I look at the GP who talks about CLI and JVM, and think, gee, maybe it would be nice to have another VM, one that's open source from the outset and not chained down by patents. And competition is good.

    109. Re:Java killer? by johnthuss · · Score: 1

      When this project was started two years ago, it was probably a good idea. But now Scala has matured and has huge momentum.

      Scala meets the need for a Java replacement and also provides compelling use-cases for switching, namely better concurrency support. Ceylon seems to abhor complexity while Scala welcomes it. But Scala's complexity is not essential; you can ignore it if you don't need it and use it if you do.

      I think Ceylon's simplicity will prevent it from meeting the expectations of a lot of developers. Not to mention the other things it will be missing for a long time (even after they have a compiler and SDK) like IDE support and a wealth of libraries.

    110. Re:Java killer? by tomhudson · · Score: 1

      No, what I am saying is that Java is still not "there" yet - and the varied responses to this article are proof that there is room for improvement. Otherwise, we'd still all be coding in assembler and saving to paper tape.

      Javanistas continually deny this. Case in point - operator overloading. It's "evil." Why? Because the programmer can't be trusted with "doing the right thing?" And yet, Java overloads the + operator for Strings, java code is rife with such uses, but still, people go around spouting that operator overloading is bad.

      Then there's multiple inheritance. There's nothing wrong, per se, with multiple inheritance. Quite the contrary - nature has shown that it's the only way when building complex systems (or would you rather stick with interfaces and single inheritance, and start singing "I'm my own grandpa" - cue the theme from "Deliverance" :-).

      Yes, there are a ton of single-inheritance systems out there - and they all suffer from a natural limit to how complex you can make things, before you have to do work-arounds that would be a natural for multiple inheritance (and easier to maintain, since class hierarchies in multiple-inheritance schemes tend to be less "deep").

      Nobody is saying that people would be forced to use either of these features if they were added to Java, just like some people continue to use c++ as just "a better c." But on a forum where everyone says "choice is good" when it comes to things like operating systems and desktop environments, saying that it's better to remove tools from the programmer ... it's nothing if not inconsistent.

      BTW - there is nothing stopping java from being a self-hosted language, if we get rid of the illusion that Java is a "write once, run anywhere" language (this was never true - just look at the mess in Java Mobile Edition), and give it the option of emitting fully native code as well as traditional, jvm-interpreted classes.

      At the very least, the native versions could translate finalizers into proper class destructors, not dependent on when (or even if) the garbage collector would run them.

      We could call it Java++ (or if you hate the idea, Java--, either works for me :-)

      Obviously, just judging by the responses to the article, at least some people want a "better java", or at least a more flexible one.

    111. Re:Java killer? by maxwell+demon · · Score: 1

      Kill off interfaces (even James Gosling admits that they were probably a mistake), add multiple inheritance.

      Up to hear I'm with you (well, not completely; instead of killing interfaces, they could be turned into something useful).

      A c/c++ style macro compiler and #include system

      A definite NO! If there's anything bad about C/C++, it's the preprocessor.
      Nothing against macros, but please not C/C++ style. And C/C++-style #include isn't a good idea at all; the only reason there's not yet a sane alternative in the C++ standard is that it wasn't considered ready.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    112. Re:Java killer? by maxwell+demon · · Score: 1

      Up to hear

      That should of course have been "Up to here" ...

      --
      The Tao of math: The numbers you can count are not the real numbers.
    113. Re:Java killer? by maxwell+demon · · Score: 1

      Those two statements are mutually exclusive :-)

      Not really. Object variables are references, and those references are passed by value. It may not be the way you normally think about it, but it is technically correct. You never pass objects in Java, neither per value or per reference. Of course, passing a reference by value is equivalent to passing the referenced object by reference, and generally you'll think about it in exactly that way, but that doesn't make his statement wrong.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    114. Re:Java killer? by Misagon · · Score: 1

      The := operator is typed that way because ASCII - 67 does not have any left-arrow character.

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
    115. Re:Java killer? by maxwell+demon · · Score: 1

      But a mistake you don't make is always better than a mistake that the compiler catches.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    116. Re:Java killer? by jjohnson · · Score: 0

      You have a bunch of interesting and worthwhile points to make, and they're lost under the layer of abusive shit you painted on top of them.

      --
      Anyone who loves or hates any language, platform, or manufacturer, doesn't know what they're talking about.
    117. Re:Java killer? by MightyMartian · · Score: 1

      You can be damned sure that Oracle would be looking to deep six any competing VM.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    118. Re:Java killer? by Anthony+Mouse · · Score: 1

      The value of Java is that the designers know how to say "no". Adding more features to a language dramatically increases the chances that code will do something unknown or unexpected.

      No it doesn't. Having the extra features in the language does not require you to use them.

      That is why Java is such an annoying language. Take multiple inheritance. You should almost never use it. It's complicated and hard to get right. The thing is, there are a small number of instances where having it will save you from having to write 10,000 lines of redundant code. So instead of doing something sensible like having a policy of not using it unless you get approval from the project lead but still having it when you need it, Java tells you to go screw yourself and just write the 10,000 lines of redundant code.

    119. Re:Java killer? by tomhudson · · Score: 3, Informative

      Sheesh, obviously I hit a sore spot :-)

      GC implementation is not a language feature, it's a runtime feature. This has nothing to do with Java as a language. Furthermore, any sufficiently complex C++ program implements some form of (at least) semi-automated garbage collection; even if it's just reference-counting smart pointers. You apparently have no experience writing real software.

      Finalizers are a language feature. The fact that a finalizer is not guaranteed to ever run, not when your class does the java equivalent of c++ "out of scope" (no valid references left to it), or even on program termination, is a language flaw. The runtime just surfaces, or exposes, that flaw.

      Would multi-threading real-time data servers that never kill off a thread from their thread pool between startup and shutdown months later while serving a thousand requests a second (because they never lose a byte of memory) qualify as "sufficiently complex"? No reference counting needed - just well-behaved code, and contracts between the loadable modules and the server as to who owns what memory.

      It's called the "Dear Abby" school of memory management. If you pick it up, put it back when you're finished. If you give it to someone, either make sure that they know that they're expected to put it back when finished, or make explicit arrangements for them to return it to you so you can put it back.

      It's not that hard to get right if such an obvious dummy as I can do it, right?

      Really though, are you seriously arguing against non-deterministic GC because you think every program in the universe should be "well-behaved" and "provable" (on your own terms)? We might as well toss out, gee, I dunno, almost every modern language under the sun while we're at it. I think I can count on one hand the number of languages in regular, widespread use today whose standard runtimes leave memory management exclusively up to the programmer.

      Finalizers in java can end up being just so much dead code, even on runs on the same machine. That's the sort of non-deterministic behaviour, where the code says one thing, but the behavior is "undefined" even between runs, that cries out for fixing. That's not "arbitrary" - that's a bug.

      "Class explosion?" This sounds like a term that would be used by a C programmer who writes C code inside of C++ classes, but who doesn't actually design object-oriented programs. "Classes if necessary, but not necessarily classes" would be exactly the kind of tripe I would absolutely never expect an experienced C++ programmer to say.

      Every non-trivial c++ program contains a fair chunk c code inside classes. All those flow control statements ... for(), if(), else, switch(), break;, continue; they're all c, not c++. Same with all the non-overloaded operators. You can't write a c++ program without using some c code. Here's a hint - look at the declaration for main().

      "Classes if necessary, but not necessarily classes" is a rule of thumb a lot of us use; in my case, it's because, before java was ever even a gleam in JG's eye, I tried the "make everything a class" idiom, and ran into the same class explosion problem everyone does. Some people think that a proliferation of classes shows how great they are at coding. I don't. Classes, like everything else, are just semantic tools for managing complexity. Nothing more. Anyone who invests them with more meaning than that doesn't understand what's actually going on behind the scenes - your classes aren't real "objects" - just a series of bytes handily organized to do the job.

      It's a separate tool though. #define is not part of the C++ language in any way. It's part of the CPP language.

      The pre-processor is an integral part of every c implementation, always has been. And what is this CPP you speak of? The c pre-proces

    120. Re:Java killer? by maxwell+demon · · Score: 1

      1980 called - they want your meme back.

      Did you warn them?

      --
      The Tao of math: The numbers you can count are not the real numbers.
    121. Re:Java killer? by maxwell+demon · · Score: 1

      C# has UNSIGNED integers.

      With sane semantics? Or did they simply copy the semantics from C, with all its drawbacks?

      --
      The Tao of math: The numbers you can count are not the real numbers.
    122. Re:Java killer? by Anonymous Coward · · Score: 0

      Slightly pedantic, but it is IEnumerable (see http://msdn.microsoft.com/en-us/library/9eekhta0.aspx) and that interface is primarily only used to get an IEnumerator interface (see http://msdn.microsoft.com/en-us/library/78dfe2yb.aspx). The point being that both interfaces are involved only with getting values not setting them.

      In your example, the .add(42) [sic] method simply doesn't exist on the interface and would fail at compile time. The reason why the example works is that object is the base class for string and so the CLR performs an implicit base class cast.

    123. Re:Java killer? by SJS · · Score: 1

      Cite, please, Gosling admitting that interfaces were (probably) a mistake. They're one of my favorite features of the language, especially when the time comes to work with other developers. In my experience, a well-defined interface reduces integration time and coupling, while multiple inheritance increases 'em.

      (To be fair, the increased integration time and coupling problems might have been due to other features of C++.)

      I emphatically *don't* want a C++ style macro compiler or include system. That leads to incomprehensible and unmaintainable code. Been there, done that, got burned. Java's biggest selling point was that it wasn't C++. Java's biggest failings are when it tries to ape C++.

      --
      Pick One: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html (Note - disable Javascript first!)
    124. Re:Java killer? by tomhudson · · Score: 1
      If you read the spec (I posted the link on one of these threads months ago, where people were going on about how java is a compiled language), the runtime interpreter will interpret the bytecode, then execute it (jump to the memory address where it's stashed the compiled version). It can save a copy of that set of compiled bytes in a cache for the next run, but profiling jits only do this for code that is repetitively executed, since it can only re-use the cached compiled code if the code execution path is exactly identical.

      The next step of optimization is to replace the byte code for the entry into the method with a jump to that compiled code.

      These are all things that take place at runtime, not compile time, which is why it's a just in time compiler.

      However, even the most recent JITs don't do this with all the code, all the time. What gets shoved into the compile cache si run-dependent. The more often it's used, the more likely.

      I know what you mean about making your own stl back in the bad old days. I didn't want to fork out extra for the source of Borland's BC 3.1 container class libraries, so implementing them was good practice.

      It's not like today. You see a problem, and you suggest to the person that they solve it by using a ring buffer or a scatter-gather array, and they're totally lost. If it isn't either a pre-written class or easily derived, forget it. And if they do write it, it will often either leak memory, or try to double-free something. If you're lucky. If you're unlucky, they'll have a random off-by-one overflow. If you're REALLY "fortunate", they'll include an underflow (like, iirc, the XBox font buffer underflow homebrew hack)..

      In fact I would love to have a "streamlined" C++ for the JVM.

      It could probably be done with a specialized pre-processor. Simple macro substitution wouldn't be enough (been there, tried that, had a bit of success).

    125. Re:Java killer? by shutdown+-p+now · · Score: 2

      IEnumerable<String> objectsA = new List<string>()
      IEnumerable<Object> objectsB = objectsA;
      objectsA.add(42); // Will this give an exception, because the list was allocated as List<String>?

      This will not compile, because IEnumerable does not have Add, nor any other method that would do the same. It's exactly like Iterable in Java.

      Note that it is illegal to write:

      IList<object> objectsA = new List<string>()

      For precisely the reasons that you have stated. Which is to say, IEnumerable<T> is covariant in T, while IList<T> is invariant in T.

      The way it's implemented is that, when you declare an interface, you can decorate type parameters with "in" and "out":

      interface IEnumerable<out T> {
          IEnumerator<T> GetEnumerator();
      }
       
      interface IEnumerator<out T> {
          T Current { get; }
          bool MoveNext();
      }

      If a type parameter is declared as "out", it is covariant. This means that within the interface, it can only be used in "output position" (i.e. as method result type, but never as argument type). Consequently, you cannot spell out the signature of any method that would mutate, like Add (without explicit, runtime-checked casts). Therefore, it is always typesafe to treat IEnumerator<Derived> as IEnumerator<Base> for any Base from which Derived inherits.

      There's also "in", which indicates contravariance - the exact reverse of the above. A write stream would be contravariant:

      interface IOutputStream<in T> {
          void Write(T t);
      }
       
      IOutputStream<string> stream = new IOutputStream<object>();
      stream.Write("foo");

      T in IList is necessarily neither "in" nor "out", because it has both "Add(T)" and "T operator[]" - and so T is used in both input and output positions.

      Note that this is also the exact same scheme that is proposed for Ceylon in the linked slides, down to keywords used.

    126. Re:Java killer? by Vectormatic · · Score: 1

      I dont have any C++ experience, so i was just going by what i saw in Cache, and to be honest, i wouldnt know a better way to handle conflict situations in multiple inheritence, but my point is that it still isnt very user friendly, and to be honest i dont really see the need for multiple inheritence anyway

      Also, the slashdot comment system currently borders on the unusable, replying to a deeply nested post is painfull to say the least. I realize us geeks suck at user interface, but come on...

      --
      People, what a bunch of bastards
    127. Re:Java killer? by Anonymous Coward · · Score: 0

      In a huge project that is from health care domain, do you know how it is important to check at compile time an constraint like you cannot call this function with a=null. Out of 1000 developers, one might call that function with a=null and to catch it, you need to write specific tests, which in a big organization is a huge hassle.

      I'm guessing you only think type checking (or type theory) as only what eclipse does and have no idea about constructs and constraints. Java is not one big good language, but by removing practices such as macros, it allowed people to develop to instrument on things.

      So by your theory: if you don't know how to use modern SE, then leave language design to people that know SE. As you might cut millions of people.

    128. Re:Java killer? by tomhudson · · Score: 1
      Nobody is saying that you'd have to use any of these features if you didn't want to.

      But let's take a look at just one area where a macro preprocessor would be handy - #defines could be inlined with the final value immediately, instead of Key.VK_X, for example.

      Now, with as simple a final static class, you'd expect that to happen at bytecode generation time anyway, but what about more complex values, that could still be inlined since the pre-processor can produce a single value?

      It can also produce code without namespace clashes, since there is then no need for an import statement - the pre-processor could produce the FQN for each class, variable, and method. You could look at the intermediate representation to see what was actually going on "under the hood."

      And be honest - you must have come across at least one time when you wished you could overload an operator, just like in c++. For example, how about an operator to prepend to a string? Or -=(count) to chop off the last count characters? Or -=(string) to remove all occurrences of string?, - (substring) to return a string with all occurrences of substring removed, or -(substring -2) to remove just the last 2 occurrences?

      Or < to insert a member into an indexed container in order, or when you know that you're going to do a lot of insertions, and then a separate reorder, just use += to append them, or -= to prepend them, and << key to trigger a resort based on key, and >> key to extract just the values that match the key?

      Nobody is saying any of it would be obligatory, just that in some cases, some of us would want the freedom to do so.

    129. Re:Java killer? by HiThere · · Score: 2

      "Classes if necessary, but not necessarily classes" would be exactly the kind of tripe I would absolutely never expect an experienced C++ programmer to say.

      This particular argument can be bolstered by looking at either Python or D. It can improve many programs.

      Also, "garbage collection" shouldn't be purely a run-time feature. In a proper language you design the language differently when garbage collection is present than when it isn't. Clearly, however, one should be ABLE to request that an object be garbage collected at a particular point. But it should be a request, not an order, in case there are still references to it dangling around somewhere. (Actually, that would really be a request that garbage collection be initiated immediately, since you need to check all pointers anyway.)

      Also, pointers should be separate from arithmetic values. It should be impossible to convert from an arithmetic value to a pointer (though not necessarily conversely). This greatly simplifies garbage collection.

      The compiler should be smart enough to handle basic classes (int, etc. should be classes, with normal class syntax except that literals exist) with special consideration an convert them into things that the CPU can directly handle. But in the language they should be classes (except for the special literal syntax). Thus a string is a class although a literal string might be written "a string". And literals can use standard class notation, thus 1.add(3) which is what 1 + 3 would be sugar for.

      The major flaw *I* find with Java is the incredible mess it makes of I/O (but some people seem to like it). A less basic flaw is the mess it made of generics. I understand that this was to maintain compatibility with older code, but it's not worth it. A different answer should have been found. I guess it's a matter of taste, but I really dislike the classes wrapped around classes wrapped around classes kind of syntax that Java promotes. (It's not inherent in the language, but in the esthetics of the library designers.) I can see the utility, but it's really ugly, and a different approach should have been found. But that might have required either multiple inheritance or mixins.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    130. Re:Java killer? by HiThere · · Score: 1

      Performance need not suffer, though compilation speed certainly would. Perhaps you could have a compiler flag that switched between fast execution and fast compilation.

      Also, there's no reason you shouldn't be able to extend from the primitive types, but you would definitely lose all the speed benefits if you did.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    131. Re:Java killer? by judeancodersfront · · Score: 1

      There is a reason to not use the JVM: security. The JRE is widely distributed and has surpassed Flash when it comes to exploits.

    132. Re:Java killer? by Anonymous Coward · · Score: 0

      I've spent years programming in both Java and C++, and I really wish Java supported operator overloading. When used correctly, it's a fantastic feature that produces cleaner, simpler, more readable, less buggy code.

      Consider this example. You want a resizable array of integers. In C++ that's a vector<int>. In Java it's an ArrayList<Integer>. Now suppose you want to add i to the j'th element. Here's the Java code to do it:

      list.set(j, list.get(j)+i);

      And here's the C++ code:

      list[j] += i;

      Which one would you rather write? And notice the Java version forces you to specify the index j twice, which is a great opportunity for bugs.

      People who object to operator overloading point out that you can abuse it. You could overload the = operator so that a=b does something bizarre, like interpret b as a URL, download whatever is found at that URL, and save it in the file referenced by a. But you can do that regardless. If you can't overload =, then instead you provide a set() function wherever you really want to define an assignment operator, so a=b becomes a.set(b). And you can just as easily define set() to do something completely bizarre. Either way, you're relying on conventions and good sense to keep people from doing that.

    133. Re:Java killer? by raddan · · Score: 1

      That's being a little unfair. *I* meant it to mean, people who write code in-house, for domain-specific purposes. I suspect that the vast majority of code being written on a daily basis is this kind of code. Stuff that it meant to run a business, not necessarily for public consumption.

      Those people just want languages that run well with a standard feature set, and bonus if the language encourages maintainability.

    134. Re:Java killer? by raddan · · Score: 1

      Except server apps, which typically start up once. If you don't have to start over and over, you can amortize that cost over the runtime of the entire program-- that makes the cost negligable. Further, you can do neat things like apply optimization based on runtime statistics-- i.e., spend the cycles optimizing JIT code where it counts. JikesRVM does this, for example.

    135. Re:Java killer? by unity100 · · Score: 1

      well what you describe plagues EVERY kind of effort on this planet actually. whether open source or private. doesnt matter.

    136. Re:Java killer? by Raenex · · Score: 1

      What the fuck is "enterprise code"? I've heard this phrase used in so much marketing, but what the hell is it supposed to mean?

      It's code that has to run inside large businesses that usually revolves around workflows that pull and push crap out of and into a database. Correctness is generally valued over efficiency, and usually more hardware will be thrown at a problem than writing it in C or C++.

      Horribly bloated code written by mouth breathers who can't grasp any other language than one which doesn't hold their hand the entire way through.

      Java gets the job done with reasonable performance, strong type checking, and a reasonably simple language. C++ used to be the "enterprise" language. It lost to Java because it's an insane language to work in, both in complexity and memory corruption, and the performance you could squeeze out of it wasn't worth it.

      Oh and you usually have to throw in a couple of frameworks and then add additional frameworks on top of other frameworks to manage your other frameworks in the process of designing "enterprise" software.

      That's just technology. You find yourself doing the same thing over and over again so you write a framework, but then that drives new technology, and the cycle continues.

    137. Re:Java killer? by Jonner · · Score: 1

      The JVM is highly optimized for Java and similar languages. Since Ceylon sounds pretty similar to Java, the JVM is probably a good choice. The JVM is not highly optimized for languages substantially different from Java, such as Python, whose JVM implementation is always significantly slower than others. As you say, Java the language leaves much to be desired, which makes me skeptical that the JVM would be a great choice for a great language.

    138. Re:Java killer? by ceoyoyo · · Score: 1

      Python is slower because it's a highly dynamic, interpreted language, and it's interpreter has also gotten a lot less attention than Java's compiler. Java is a compiled, much less dynamic language.

      You're right, a regular JVM might not do such a hot job of working through all the code generated by something like Python, but it could be used effectively with a language that is less annoying than Java while still being fairly static.

      I doubt Ceylon is going to be a language I'd be much interested in. Python + Cython + C is a pretty potent combination for pretty much everything. It might be good for some things though.

    139. Re:Java killer? by Raenex · · Score: 1

      Well-behaved, provable programs need to be deterministic.

      malloc() and free() are not deterministic.

    140. Re:Java killer? by Jonner · · Score: 2

      Python is slower because it's a highly dynamic, interpreted language, and it's interpreter has also gotten a lot less attention than Java's compiler. Java is a compiled, much less dynamic language.

      If by "compiled language," you mean that the first step in running a program is transforming source code into some other form, then both Python and Java are compiled languages (as are the vast majority of commonly-used language implementations). Both Java and Python implementations use compilers that transform source code into intermediate forms (byte code). In both cases, very little run-time optimization can be done at that level AFAIK.

      The use of compilation is not truly a property of a language, but of an implementation of a language. For example, in addition to the official implementations, there are implementations of both Java and Python that transform source code into native machine code ahead of time, bypassing any byte code.

      When talking about compilers, you also have to be careful about which compilers you're talking about. Most implementations of Java use a JIT compiler which transforms Java byte code into native machine language at run time. The official implementation of Python (CPython) does not have a JIT compiler, but there are several projects which add a JIT to CPython, including Unladen Swallow and Psyco.

      I want to be extremely clear that I was not comparing the maximum execution speed of equivalent Python and Java programs, since Python will probably never rival Java in that way. I was talking about the suitability of the JVM for executing programs written in languages that are very different from Java, such as Python. Jython is an implementation of Python that does just that, but has only recently caught up to regular CPython's performance, even though it benefits from the JVM's JIT compiler.

      As much work is being put into increasing performance of CPython, I think PyPy is much more interesting. Though PyPy is written in Python and a subset of Python called RPython, it can execute Python around three times faster than regular CPython or Jython.

      You're right, a regular JVM might not do such a hot job of working through all the code generated by something like Python, but it could be used effectively with a language that is less annoying than Java while still being fairly static.

      I doubt Ceylon is going to be a language I'd be much interested in. Python + Cython + C is a pretty potent combination for pretty much everything. It might be good for some things though.

      I haven't tried Cython yet, but it sounds very interesting and I'll definitely try it when it seems appropriate. However, if just increasing performance is a goal, simply using PyPy might be just as good as Cython if examples like this are to be believed.

    141. Re:Java killer? by ceoyoyo · · Score: 1

      In standard usage, saying X is a Y language refers to the canonical implementation of X. So Python is an interpreted language means CPython is interpreted, and doesn't refer to any of the experimental JIT versions.The Python that everyone actually uses is an interpreter that works with an intermediate bytecode representation. The Java everyone has uses a just in time compiler. The difference is kind of hazy sometimes, but there is enough of one to talk meaningfully about Python being interpreted and Java being compiled. (http://en.wikipedia.org/wiki/Interpreter_(computing))

      Don't forget to read to the bottom of that PyPy blog article. PyPy is certainly an impressive tool, but you can get a big improvement with something like Cython that lets you give the translator hints. The actual benchmarks:

      CPython: 59.593 s
      PyPy: 8.947 s
      Cython: 3.5 s after adding a few types

      Adding a few types in Cython means statically typing a few heavily used variables. His other (approx. 26 s) result with Cython I can only assume involved just Cythoning his straight Python code, which isn't really what Cython is supposed to do. The beautiful part of Cython is that you CAN give it straight Python code, or straight C code, or anything you want in between.

    142. Re:Java killer? by Jonner · · Score: 2

      In standard usage, saying X is a Y language refers to the canonical implementation of X. So Python is an interpreted language means CPython is interpreted, and doesn't refer to any of the experimental JIT versions.The Python that everyone actually uses is an interpreter that works with an intermediate bytecode representation. The Java everyone has uses a just in time compiler. The difference is kind of hazy sometimes, but there is enough of one to talk meaningfully about Python being interpreted and Java being compiled. (http://en.wikipedia.org/wiki/Interpreter_(computing))

      I say that in "standard usage," a compiled language is one whose implementation produces an executable, native code file. By that definition, Java is not a compiled language (unless you use GCJ or another non-canonical native code compiler). Which standard are you using?

      If you want to say that an "interpreted language" is distinct from a "compiled language," where does that leave Java? Most implementations involve both compilers and interpreters. The most commonly used implementations currently use Java byte code interpreters, with JIT compilers that generate native code from some of the byte code. They are completely functional with the JIT turned off, but can't do anything without their interpreters. While it is useful to describe a language implementation as using a JIT compiler, to simply call it a "compiled language" is not, since an increasingly overwhelming majority of source code is compiled at some point.

      Since you mention "canonical implementation," what is the canonical implementation of Java? Is it whatever you can download from Oracle at the moment, OpenJDK, IcedTea, whatever comes with your OS, or something else? The early releases of Java from Sun did not have a JIT compiler. Did Java suddenly transform from being an "interpreted language" to a "compiled language" when Sun started including the HotSpot JIT compiler?

      Don't forget to read to the bottom of that PyPy blog article. PyPy is certainly an impressive tool, but you can get a big improvement with something like Cython that lets you give the translator hints. The actual benchmarks:

      CPython: 59.593 s
      PyPy: 8.947 s
      Cython: 3.5 s after adding a few types

      Adding a few types in Cython means statically typing a few heavily used variables. His other (approx. 26 s) result with Cython I can only assume involved just Cythoning his straight Python code, which isn't really what Cython is supposed to do. The beautiful part of Cython is that you CAN give it straight Python code, or straight C code, or anything you want in between.

      Yes, Cython clearly does have great advantages in speed over pure Python code and I shouldn't have implied that it didn't. I certainly will consider using it if I find some Python code that's running too slowly. However, that blog post also didn't compare an implementation in RPython, PyPy's Python-like language which also executes much faster than full Python.

    143. Re:Java killer? by swilly · · Score: 1

      Everything in Java is passed by value. And every object variable is a reference.

      Those two statements are mutually exclusive :-)

      All object variables are references. When passing the object to a method, the reference is passed by value. You can change it object if it is mutable, but you cannot change the reference (which is why you can't create a swap method to swap two values).

    144. Re:Java killer? by kaffiene · · Score: 1

      Sure, but humans shouldn't have to be perfect. If something is trivially caught by the compiler, it's best left to the compiler

    145. Re:Java killer? by kaffiene · · Score: 0

      I've coded in C++ since the early drafts of the language. I know how multiple inheritance or operator overloading work in C++ perfectly well, thank you. In fact, I'd be pretty damn sure that I have more C++ experience than you do - unless you were actually on the development team with Stroustrup?

      I explained why multiple inheritance is bad (the diamond problem - other people have pointed this out and I notice you haven't answered any of them, you just keep ranting the same stuff). I also explained how to solve those issues in a way that's better than either MI or SI with interfaces - namely mixins / traits. You've ignored that even though that's clearly a better solution than either MI or SI+I.

      You don't seem to take off your C++ blinkers and see that there are other ways to do things, and contrary to your apparent point of view, C++ did not get everything right. The answer to every language design issue is not "make it C++"

    146. Re:Java killer? by Lokitoth · · Score: 1

      Not sure I agree with your statement about no "jvm" that can handle multiple programs at once. Simply implement a classloader (provided you know what you are doing, and know how to avoid leaking types), and fork a thread to run each [entry].main(args) in the context of their own classloader. If you implement a classloader heirarchy you can avoid having to load the JRE classes more than once. When the thread exits, dump the classloader. Did I miss some important constraints here?

    147. Re:Java killer? by Lokitoth · · Score: 1

      So, I am curious, how do you deal with exceptions without SmartPointers? Or do you wrap every function block in a try{}/catch{throw} block?

    148. Re:Java killer? by Lokitoth · · Score: 1

      Language features in general are great until you have to code with other people.

      Lack of them is no substitude for good conventions and process when working on a team.

    149. Re:Java killer? by Lokitoth · · Score: 1

      Tom, guaranteed finalizers lead to issues. Example:

      gcroot -> ... some path 1 ... -> A { B { "I am a DB connection to localhost:3361" } }
      gcroot -> ... some path 2 ... -> B

      You get rid of last pointer to A and run the finalizer. In your finalizer you decide to clean up B. But you have no way to know whether B is pointed to by another object.

      You could make the argument that you should not clean up objects outside of their own finalizer. But then what are you cleaning up? Any change to state external to the object can screw something up due to an unexpected gcroot path, and any change to state internal to the object should not matter at all. I can see the argument that you could have resources that you never shared outside of the closure of the object you are finalizing but do you really want that enforced at compile-time? Otherwise you lose the memory-safety that having a GC guarantees you.

      I am not saying this cannot be done, but simply arguing that not having it is a terrible flaw is not productive either. There were good reasons behind making the choice to have Finalizers not be guaranteed in JVM (and CLR for that matter).

      Aside: @ /. : WTB <pre> tag support.

    150. Re:Java killer? by kaffiene · · Score: 1

      I don't really agree. I think you need both a supportive language and good developer culture to make developing in a team successful. They're both necessary but not individually sufficient conditions for a good dev. team.

      I have worked with teams of smart, well intentioned C++ programmers who despite conventions and reviews to the contrary, end up developing code in stylistic cul-de-sacs that none of their fellows shared.

      Specifically regarding operator overloading - really, I don't mind EXTREMELY limited use of operator overloading, but someone ALWAYs ends up abusing the feature. And in real life, you don't control all the code you use. In the real life, you use third party code, over which you have no control and your style guides and procedures are worth precisely NOTHING in that case.

      Also, regarding overloading, my other major objection is that it's not actually possible to do it properly:

      * You can't use all the appropriate operators - Vector maths uses cross and dot product operators. I can do cross product in the conventional way - using the multiply operator, but I can't overload the dot operator at all.

      * In most cases, you're stuck with the language's built in operator precedence, which is often wrong (e.g.: in Vector maths, dot product conventionally has lower precedence than cross product)

      * I'm aware of no implementation that will give you the other important notation in vector mathematics - the length and normal operators: |v| ||v||

      So, you can't actually write code to look like a simple, common mathematical domain like Vector mathematics. And most of the time, mathematicians aren't writing code, coders are writing code. So following the principles of least astonishment and the principal of code orthogonality, we should have code that looks like normal code, not code that wants to look like mathematical notation but can't even get halfway there.

      Operator overloading is a neat idea but an imperfect, ill-fitting reality.

    151. Re:Java killer? by SplashMyBandit · · Score: 1

      It's not only that. How to you handle deallocation of a multitude of heap-allocated objects that are shared amongst multiple-threads. When do you get rid of it without 'pulling the rug out from under' another thread that is using it? You end-up either not using threads (since they're relatively painful in C++) or rolling your own pseudo garbage collector - neither of these is a 'win'.

    152. Re:Java killer? by SplashMyBandit · · Score: 1

      Writing your own classes for basic stuff is a fail in the modern marketplace. Commercial development usually cannot afford this kind of overhead (although it is perfectly fine for hobbyist and academic work with looser time constraints). In large scale commercial development (large teams of programmers) your suggestion is simply not an option. Large scale development with a large degree of multi-threaded processing and your suggestion is even more removed from reality. Sorry, rolling your own basic classes is madness in this day and age.

    153. Re:Java killer? by The+End+Of+Days · · Score: 1

      But this isn't even about the Java language. Are you just taking any old opportunity to bitch?

    154. Re:Java killer? by tomhudson · · Score: 1

      You're using the "new, improved" interface. Go into your account preferences and set the discussion to D1 - (Account -> Discussion -> Classic )

      The new interface is useless.

    155. Re:Java killer? by tomhudson · · Score: 1

      both malloc() and free() will execute when you call them. Finalized methods in java may be called on some runs, and not on others, depending on the state of the garbage collector. Nice way to turn code into unreachable, dead code, at random..

    156. Re:Java killer? by ceoyoyo · · Score: 1

      "Which standard are you using?"

      Java uses a just in time compiler, so it's compiled. The wikipedia article agrees. I said the difference is subtle.

      "Did Java suddenly transform from being an "interpreted language" to a "compiled language" when Sun started including the HotSpot JIT compiler?"

      Yes.

    157. Re:Java killer? by tomhudson · · Score: 1
      I did answer the diamond problem. It's a symptom of people designing class frameworks that are too ambitious for the project at hand, and can be avoided by proper design. It's also a solved problem in cases where people design too-deep class hierarchies and insist on always extending base classes - either use the scope resolution operator, or use virtual functions.

      Also, it is you who needs to take off the blinkers - I never said anywhere, at any point in my life, that c++ "got everything right" - but java has definitely got some things wrong, as is evidenced by the response to the original article.

    158. Re:Java killer? by tomhudson · · Score: 1
      Yes, you did. Sun tried to make a multiple-program jvm. They abandoned it (I posted the links elsewhere in the thread) because the ONLY way to guarantee that all resources are reaped is to terminate the jvm and let the OS de-allocate everything that the gc didn't get (such as the finalizers that never got called, or got called and threw an exception).

      So dumping your class loader won't free up those resources, and you'll eventually end up starving for one resource or another. The jvm was originally only supposed to run a tv set-top box, not be a general-purpose runtime. For years, java was a "solution" in search of a problem.

      Now, we finally have computers that are fast enough and with enough ram to run java decently (no, it's not the jvm and jit that are responsible - go and dust off that old 200mhz pentium with 16 megs of ram and see if the jit suddenly makes it usable ...)

      And javanistas are so sentitive to ANY criticism that pointing out that at least some of us would like operator overloading and multiple inheritance instead of a single-hierarchy class system makes them go nuts.

      Nobody would be forcing them to adopt any of these features ... but they are so defensive of the "one true way" that they take it as heresy that some people want the option of having more than one way to do things.

    159. Re:Java killer? by Raenex · · Score: 1

      True enough, though malloc/free are not deterministic when it comes to their performance, which for some applications is a killer. Also, for C++ you only talked about object destructors getting called "when the stack frame is popped as your object goes out of scope". That only works for stack-allocated objects.

      And if you really want to talk about "Well-behaved, provable programs need to be deterministic," then C++ is an abject failure in this regard because of memory corruption when a programmer makes a mistake (as they often do), much of which has to do with manual memory allocation and de-allocation.

    160. Re:Java killer? by tomhudson · · Score: 1
      The first thing I did was to remove the STL from all the core code (the people who had written the previous version wrapped everything in spartptrs - a real dumb move).

      The next thing was simple -

      1. server allocs the parameter struct.
      2. server passes reference to parameter struct to thread.
      3. for each loaded module ... 4. thread allocs resources as needed. For results, it alloc()s them with a pointer to the appropriate portion of the parameter struct reserved for that. For internally-used processing, alloc() and free() in pairs, so there's nothing to keep track of locally. Sometimes, that takes a bit of planning, but it can be done. 5. when all modules are finished, the thread has no dangling alloc()ed pointers - the param struct has them. 6. the server processes the thread's results (from the param struct), then frees up all the resources pointed to by the various "slots" in the struct, and finally free()s the struct and allocates a new one.

      Does it work? Well, 3 separate server processes on the same 512 meg box, with 400, 100, and 100 threads in their respective thread pools, running over a 4-day weekend continuously, 1000 requests per second test, and Tuesday morning still plenty of memory left. (we tested on low-ram machines so that any bugs became apparent quicker).

      With proper design, there is no need for smartptrs, weakptrs, etc., and no need to kill off a thread after x number of requests to reclaim lost ram. The problem is, such design takes time - lots more time than people are usually willing to invest - not just in the server portion, but in the individual modules, because even a one-byte leak will kill it.

      Now, a year after I left, the programmer who was left to do the maintenance did exactly that - it would crash every 4-6 hours. He had introduced a small memory leak, but even one byte, at 1000 requests a second, is still 1k a second. He had introduced a leak of 200k per request. Respawning each thread after it has served X number of requests would have "fixed" that (the cheat used by most threaded servers), but that was an unacceptable solution in this case - even the small delay in respawning a thread was a no-no..

    161. Re:Java killer? by tomhudson · · Score: 1

      Sorry, but that's exactly what we HAD to do for a multi-threaded application to meet the guarantees of low latency and no loss of memory.

      Besides, once you've done enough classes, the usual "gotchas" that result in memory leaks are easy enough to avoid.

      It's also often quicker to write your own classes than it is to adapt a "standard" class. And by writing your own, you avoid a lot of problems (like all the people who are whining about the "diamond problem" wrt multiple inheritance. It won't happen when you write your own, unless you really screw up, and even then it's easy enough to fix).

    162. Re:Java killer? by DocHoncho · · Score: 1

      What are you talking about? The style of operator overloading he's talking about is hardly any different than the C++ style.

      What is the functional difference between Python's

      class Foo(object):
          def __add__(self, other):
              return self.value + other.value

      and the C++ equivalent

      class Foo {
          Foo operator+(Foo &other) {
              return Foo(this.value + other.value);
          }
      }

      I'm not familiar with Smalltalk, but I would imagine that other "operator methods" could be overloaded in a similar fashion. In all cases the compiler is going to see
      foo + bar
      (where both are instances of the Foo class) as
      foo.__add___(bar)
      and
      foo.operator+(bar)
        respectively.

      --
      Celebrity worship is a poor substitute for Deity worship and costs more to boot.
    163. Re:Java killer? by tomhudson · · Score: 1

      Fair enough, but I would suggest that the errors due to manual memory allocation and deallocation are programmer errors, not implementation flaws, and this can be fixed by proper design and always being aware (and wary) of who owns what pointers.

      No language is perfect, and no language ever will be, because once we get the "perfect language", we'll then try to apply it to new problems, and find out it's not perfect any more :-)

      But take a look at what everyone is so upset about - they don't like my statements that some of us would like the ability to use multiple inheritance, and to be able to overload operators. Why? Because the have encountered problems using them in the past. So what?

      Same goes to my habit of writing my own classes in c++. I don't use the stl because it doesn't provide anything I can't do by hand, and I don't need to pull in another 200k of code just for a lousy string class or a stack or a linked list or a scatter/gather array or a ring buffer or whatever. These are basics that anyone who hopes to implement more complicated classes better have down pat.

      But they then go on to say this doesn't make sense to write your own classes - and yet, that's what you spend most of your time doing in Java. Just because they're afraid of the "big bad wolf" of a dangling pointer doesn't mean that we should all eschew writing our own classes. Someone has to do it, and there was a time when this was a basic skill - if you couldn't do it, you weren't a real programmer, go to BASIC, do not pass GO, do not collect $200.

      All this to try to justify their stand that nobody should dare ask for multiple inheritance or operator overloading in Java. Nobody would force them to use either, but their reaction is like the people who oppose same-sex marriage because somehow it "devalues" their marriage.

      What is the big deal with asking for more flexibility in the language, and more ways to express oneself in code?

    164. Re:Java killer? by Raenex · · Score: 1

      We're definitely not going to agree on basic principles. I hate the "blame the programmer" school of thought when the language makes it easy to make mistakes humans are just good at making. This is why we have type systems.

      I don't have a firm opinion on multiple inheritance, except to say that inheritance in general is fragile, and there are probably better ways to do it. I really have to study what Go does in this area. Operator overloading -- I can live without it. It's definitely prone to abuse, and I don't think the benefit is so great.

      Re-writing standard classes over and over again? Waste of time and more code to maintain.

      What is the big deal with asking for more flexibility in the language, and more ways to express oneself in code?

      You can trace this argument all the back to the original goto debates. It's the same issues. Flexibility vs error and abuse prone.

    165. Re:Java killer? by n+dot+l · · Score: 1

      (and I doubt anyone uses it now that C# has a generic feature)

      It's still incredibly handy for things like reflection and dynamic dispatch systems.

    166. Re:Java killer? by tomhudson · · Score: 1

      Unfortunately, Java doesn't allow the programmer to define ANY operator overloading operations. The string overloading is hard-coded into Java.

    167. Re:Java killer? by kaffiene · · Score: 0

      where did *I* say that Java got everything right?

    168. Re:Java killer? by Jonner · · Score: 1

      Well, you give one example to support your assertion that Java is (sometimes) a "compiled language" and I gave two to support my assertion that it is not. However, my real point has been all along that there is no "standard usage" for the term "compiled language"; it no longer has any meaning and was always imprecise or misleading.

    169. Re:Java killer? by Anonymous Coward · · Score: 0

      I myself like to think Java developed into Scala. While I was reading your list of added features, I couldn't help but think, Scala has it, Scala has it, Scala has it, ...
      (the type erasure problem was a bit difficult, also for efficiency's sake, but they've started taking care of that with @specialize and Manifests, it's getting pretty cool)

    170. Re:Java killer? by badkarmadayaccount · · Score: 1

      Text macros? Are you stupid, or just sadistic - clean up the fraking syntax, add lisp style macros, ok, but text macros suck. Oh, and what do you need #includes for? A Go style package system is far superior. And, AFAIK, Gosling never said to get rid of interfaces, but to separate them, and use prototype object model for implementation.

      --
      I know tobacco is bad for you, so I smoke weed with crack.
    171. Re:Java killer? by badkarmadayaccount · · Score: 1

      What in the world do you need unprotected pointer math for? Are you writing an OS, or JIT?

      --
      I know tobacco is bad for you, so I smoke weed with crack.
    172. Re:Java killer? by badkarmadayaccount · · Score: 1

      I think Ada needs a refresh on the OO spec - they might be needed.

      --
      I know tobacco is bad for you, so I smoke weed with crack.
    173. Re:Java killer? by maxwell+demon · · Score: 1

      But a solution where imperfect humans are less likely to make errors to begin with is better than one where they are likely to make errors. Of course, the compiler should catch the error in both cases.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    174. Re:Java killer? by Lokitoth · · Score: 1

      This will compile just fine. Remember that List != List in C#, even when you substitute for , since the first is [].List and the second is [].List`1, with runtime binding to

    175. Re:Java killer? by shutdown+-p+now · · Score: 1

      I assumed that GP meant to write "List<object> objects = new List<string>()", and Slashdot parser stripped out the <> as usual (same as it did for your post); otherwise his reply doesn't make much sense in the first place.

    176. Re:Java killer? by SJS · · Score: 1

      Everything in Java is passed by value. And every object variable is a reference.

      Those two statements are mutually exclusive :-)

      Objects are passed by reference, which means that NOT everything is passed by value. Only the reference to the object is passed by value :-)

      This is what happens when you don't start students with Pascal and give them proper training in what lexical scope really means. :)

      Let's cover the basics, shall we?

      Variables are aliases for memory locations.

      When we say "pass by value", I mean that the _value_ of a variable is passed to the subroutine.

      When we say "pass by reference", I mean that the _location_ of a variable is passed to the subroutine.

      Java is a pass-by-value language, with one of the types being an "object-reference". When I pass such a type to a subroutine (method), the *value* of the variable is passed, and /not/ the location of the variable.

      If Java were a pass-by-reference language, then the output of:


      public class IfJavaWereAPassByReferenceLanguage {
            public static void main( String [] args ) {
                  String s = "Hello ";
                  System.out.print( s );
                  foo( s );
                  System.out.println( s );
            }

            public static void foo( String reference ) {
                  reference = "World";
            }
      }

      would be "Hello World".

      But it isn't, so Java isn't a pass-by-reference language. It helps to draw a picture. It can take a bit of effort to understand what's going on for some people, but drawing a picture of what's actually going on helps a lot.

      --
      Pick One: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html (Note - disable Javascript first!)
    177. Re:Java killer? by SJS · · Score: 1

      Very true.

      In C++, when you overload an operator, you change the order of precedence for that operator. This can result in some very annoying bugs.

      Before I ever jump on the "operator overloading is a good thing" bandwagon, I'd like to see it done right in a language, somewhere. Until that time, the preponderance of the evidence, to me, is that unrestricted operator overloading isn't worth the trouble it brings with.

      I have a sneaking suspicion that to do operator overloading "right", you'll have to implement a field.

      --
      Pick One: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html (Note - disable Javascript first!)
    178. Re:Java killer? by kaffiene · · Score: 1

      It's ideal if you never type errors, but I suspect with equality checking vs assignment, there's always going to be some mistakes since "A equals B" is how we talk about both equality and assignment. If you have ":=" or ".equals()", people will still mistakenly write "=" from time to time. I've used dozens of different languages with different equality tests and assignments and invariably I get them wrong from time to time.

      I personally don't dislike any of them (except Javascript - don't like ===) the only thing I can't stand is the compiler silently accepting stuff it should warn you about "if(a=b)" in Algol based languages being the classic example.

      So, I agree with what you're saying - in theory - I just don't think there IS any language that does a significantly better job than any other in making assignment and equality testing impossible to screw up.

    179. Re:Java killer? by maxwell+demon · · Score: 1

      It's ideal if you never type errors, but I suspect with equality checking vs assignment, there's always going to be some mistakes since "A equals B" is how we talk about both equality and assignment.

      You say "a equals b" when you talk about assignment!? I definitely don't.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    180. Re:Java killer? by tomhudson · · Score: 1

      My point was that the statements are in fact mutually exclusive - a reference to an object is not the object itself, so the statement that "everything is passed by value", when only a reference to it is passed, is simply not true.

      No need to get into a long example. The reason for passing non-primitive values by reference has always been that it takes less space on the stack (Java's implementation is stack-based). You only need to place a copy of the memory location on the stack, not copy the actual data (which, with an array or an object, could be quite large).

      Just because the object reference is automatically dereferenced in Java doesn't mean that we can get away with saying that "Everything is passed by value", since object never are passed by value. So:

      Everything in Java is passed by value.

      is simply not true. Objects are never placed on the stack - which is where parameter "passing" takes place. It's always been like that, even back in the days of assembler..

    181. Re:Java killer? by SJS · · Score: 1

      Objects are never placed on the stack - which is where parameter "passing" takes place. It's always been like that, even back in the days of assembler..

      Um, there are conventions where no stack is used to pass parameters. An when you get to the level of writing assembler, a stack is purely optional. So, no, even back in the days of assembler, parameter passing was not necessarily done with a stack. Even now, passing parameters in registers is an acceptable convention on register-rich hardware.

      At this level, it's best to think of Java as having nine primitive types: boolean, character, byte, short integer, integer, long integer, float, double, and object pointer (or object reference, but that just leads to confusion when talking about pass-by-reference). When you "pass an object" to a method in Java, you actually pass the _value_ of the object pointer to the method.

      When you use a language with "actual" pass-by-reference semantics, there are certain behaviors you expect to see, such as the one I described. We do not see those behaviors in Java.

      Just because the object reference is automatically dereferenced in Java doesn't mean that we can get away with saying that "Everything is passed by value", since object never are passed by value.

      Actually, we can.

      If the language didn't actually allocate an object pointer variable distinct from the object itself, I'd concede your point. In that case, the memory location aliased by a variable would be the actual object, and that would arguably be a pass-by-reference language. It would also be a noticeably different language.

      Seriously, show me how to write a method in Java that sets the parameters in the calling scope to null, and I'll agree with you.

      e.g.,

            Object s = "can't touch this";
            Object t = new Object();
            foo( s , t ); /* at this point, s and t should both be null */

      I've never been able to figure out a way to do this in Java.

      And that's why I call Java a pass-by-value language.

      --
      Pick One: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html (Note - disable Javascript first!)
    182. Re:Java killer? by AnonymusCowMoo · · Score: 1

      you assume correct

    183. Re:Java killer? by SJS · · Score: 1

      The fact that Java's primitive types are all immutable makes this even easier -- immutable objects are very well-behaved.

      Um... what?

      Are you sure you meant to write "immutable" here?

      --
      Pick One: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html (Note - disable Javascript first!)
    184. Re:Java killer? by SJS · · Score: 1

      The major flaw *I* find with Java is the incredible mess it makes of I/O (but some people seem to like it). A less basic flaw is the mess it made of generics. I understand that this was to maintain compatibility with older code, but it's not worth it. A different answer should have been found. I guess it's a matter of taste, but I really dislike the classes wrapped around classes wrapped around classes kind of syntax that Java promotes. (It's not inherent in the language, but in the esthetics of the library designers.) I can see the utility, but it's really ugly, and a different approach should have been found. But that might have required either multiple inheritance or mixins.

      The wide-char stuff in Java is the messiest part, in my opinion, while the multitude of stream classes were the nicest. What *part* of I/O bothers you the most?

      Generics are indeed a mess. All I wanted was covariant return types, but instead the language got screwed up by the type-theory weenies. Of all the problems I had seen in Java code by that time, getting the wrong type out of a container instance resulting in a class cast exception was *not* a common problem. It was a clever solution looking for a problem, which is a recipe for disaster.

      Which, really, is the key lesson that isn't being learned by most of the folks who want to improve on Java: clever is a bad idea unless it solves an actual problems encountered by real programmers, as opposed to solving concocted problems by theory-minded boffins.

      --
      Pick One: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html (Note - disable Javascript first!)
    185. Re:Java killer? by cakoose · · Score: 1

      Yeah, in the same way strings are immutable. You can't change a 12. But even if "immutability" is potentially a matter of perspective, the key feature is referential transparency -- nobody else can change your values.

    186. Re:Java killer? by Anonymous Coward · · Score: 0

      I don't think 'moved on' means what you think it does.

      Or, I think you are a great HTML programmer.

    187. Re:Java killer? by unity100 · · Score: 1

      hahaha ahahaha. sarcasm.... how rare to see it on the web.

    188. Re:Java killer? by Excelsior · · Score: 1

      linux prevailed, firefox prevailed

      Both were built as an alternative to a dominate proprietary product owned by an onerous, tight-fisted corporate entity. The same could be said for Open Office, XMPP, Apache HTTP, Android, and a variety of products that "prevailed". Thus, they had a groundswell of community support.

      The difference here is, Java is a GPL product. A number of alternative languages built on the JVM have cropped up, but they are competing with "free" (the freedom and beer variety). I've yet to see any do much "killing" of Java. Scala, Groovy, and Clojure are all popular in their own right, but haven't made a dent on the enormous Java community. Further, most of them depend heavily on an inherent ability to utilize the S2JDK.

      I find this to be much ado about nothing.

  9. Scala? by Anonymous Coward · · Score: 0

    There's already a Java killer that runs on the JVM, it's called Scala.

    I thought this dude had come up with a CVM (Ceylon Virtual Machine?), but sounds to me like just another wheel, re-invented.

    1. Re:Scala? by shutdown+-p+now · · Score: 1

      Scala is a good language, but it is too featureful to be a good "enterprisey" language. It's awesome if you grok all the powerful stuff like closures and currying and path-dependent types; but, consequently, when you start writing code using all that, Joe Schmuck, who had only coded Java before, is going to cry when he sees it because it's about as readable to him as a snippet of Emacs Lisp. And there are many more Joes out there than there are people who know how to use Scala and the likes.

    2. Re:Scala? by dcs · · Score: 1

      I hear that argument often enough. What I never heard of is someone who consider himself one of these "Schmucks" -- the Schmucks are always "others".

      In fact, it's my belief they don't exist. Not that there aren't bad programmers who write bad programs in any language they come in contact with -- just that there really isn't this mythical threshold beyond which some programmers can't write any program at all -- instead of just producing the bad programs they have always written.

      And to write any enterprise Java program nowadays means a knowledge of application servers, annotations and annotation processors, JNDI, and, more likely than not, half a dozen frameworks such as hibernate, a web framework, testing framework and mocking library. Compared to learning all that, closures is a non-issue, currying and currying a curiosity. Path dependent types might be equivalent magic to stuff such as GUICE dependency injection -- something to be repeated by rote learning instead of truly understood (and one is way less likely to stumble on a path dependent type than on a smart annotation).

      Much on the contrary of what is claimed here, Scala gains ease acceptance on Java shops that try it out. Take a look at INFOQ's recent interview about The Guardian's introduction of Scala for an example of that.

      I have only ever heard of two persons who tried out Scala and didn't like it, one of whom was as much turned off by a bad experience with IDE support than anything else.

      --
      (8-DCS)
    3. Re:Scala? by shutdown+-p+now · · Score: 1

      I hear that argument often enough. What I never heard of is someone who consider himself one of these "Schmucks" -- the Schmucks are always "others".

      The reason why you don't hear anyone calling themselves that is because most people who are like that are blissfully unaware that there's anything beyond what they already know.

      Nonetheless, it's a real issue. The awareness of it has appeared much earlier in .NET land, because there language evolution has been much less restrained. When .NET 3.5 came out, with LINQ (and its lazy evaluation) and lambdas and whatnot, suddenly you had a lot of people complaining that they couldn't make any sense out of it. Anyone who hanged out at, say, StackOverflow (or any other large community hub) can attest to that. Quite a few coding shops have established guidelines which practically banned the new features outright, to retain the Javaesque "every line of code means exactly what it looks like" feeling. This worked for some time, until new stock libraries caught up with the language.

      And to write any enterprise Java program nowadays means a knowledge of application servers, annotations and annotation processors, JNDI, and, more likely than not, half a dozen frameworks such as hibernate, a web framework, testing framework and mocking library.

      Yes, someone has to really understand all of the above. They're usually also people who don't have a problem with Scala (or at least don't have a problem understanding it; liking is another issue). But then, how many "enterprise" applications have you seen where e.g. dependency injection is used as a kind of magic incantation, with person writing it just copy/pasting code straight from the Net, without actually understanding what it does, and very puzzled when they need to make some changes to do something they want?

      Unfortunately, a lot of that kind of programming has evolved into cargo cult. I don't want to sound racist here, but this is especially prominent within Indian development community (not that others don't do it, it's just that there it's much more visible), and consequently in outsourced projects. Either way, for that kind development, using Scala does not make any difference whatsoever, because to people writing the code it simply means using somewhat different magical incantations. They don't really gain anything from doing so, but the pain of maintaining that code afterwards is that much higher, because there are so many more non-obvious ways to do things, and you'll be almost certain that most of them will be in some or other code taken off the Net.

  10. Obligatory by cultiv8 · · Score: 2

    Do they have a plan?

    1. Create awesome programming language that kills Java
    2. ???
    3. Profit

    --
    sysadmins and parents of newborns get the same amount of sleep.
    1. Re:Obligatory by Anonymous Coward · · Score: 0

      2 involves destroying the 12 colonies.

    2. Re:Obligatory by jd · · Score: 1

      2. Invade the 12 colonies during peace talks

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    3. Re:Obligatory by JasterBobaMereel · · Score: 1

      ...Built on the JVM so has all the disadvantages of Java, ....

      This is no different that the host of alternative languages that run on the JVM ....and are already out there ...

      --
      Puteulanus fenestra mortis
  11. Pointless by steveha · · Score: 3, Insightful

    They are proposing a new language, with new syntax, requiring new libraries... that runs on the JVM.

    Since Oracle owns the JVM and is trying to find ways to extract money from it, a new language that requires the JVM seems pointless.

    If you just want better syntax, why not use one of the existing JVM languages such as Scala?

    If you are pioneering a completely new language, why not pioneer a new virtual machine, and lawyer up and make sure Oracle doesn't have any grounds to sue you?

    steveha

    --
    lf(1): it's like ls(1) but sorts filenames by extension, tersely
    1. Re:Pointless by Anonymous Coward · · Score: 0

      Oracle doesn't own the JVM - they own their reference implementation.

    2. Re:Pointless by Anonymous Coward · · Score: 0

      maybe they can rattle the Mono devs too. This is what SHOULD have been going on instead of Mono. At some point the will have critical mass and then the replacement vm just has to run their stuff. As several other OSS language projects rely on JVM (python, ruby, and others) to create new paradigms quickly, I'd see moving to a replacement a high priority. Mono's stuff could be borrowed, without trying to chase a for-profit standard, Mono's tools would jump 5 years ahead almost overnite.

    3. Re:Pointless by Anonymous Coward · · Score: 1

      Oracle doesn't own the JVM - they own their reference implementation.

      Then please explain why Google didn't use the JVM, and felt compelled to invent something equivalent called "Dalvik".

      Also, whether or not Oracle owns the JVM, Oracle is suing Google on the theory that Oracle owns anything that looks like the JVM.

    4. Re:Pointless by jd · · Score: 1

      I'd have thought using the LLVM as a baseline and writing a new language to work on top of it would be easier than writing a new VM. It's a decent framework.

      However, writing a new VM wouldn't be such a bad idea - Java's VM has evolved over a very long time (Sun had originally developed it for controlling appliances) and it carries a lot of cruft as a result. This is why it has only recently started to improve on threading, garbage collection is difficult to configure well, Swing is based on AWT and why Java applets have largely been abandoned in favour of Javascript + XML despite being theoretically more powerful (if signed) and theoretically faster (it's compiled into bytecode rather than interpreted). Java also isn't pure OO - it's faster, yes, but it's much harder to debug mixed-style languages because you lose clarity.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    5. Re:Pointless by syousef · · Score: 1

      If you are pioneering a completely new language, why not pioneer a new virtual machine, and lawyer up and make sure Oracle doesn't have any grounds to sue you?

      steveha

      Because it might be cheaper to buy Oracle than lawyer up against it?

      --
      These posts express my own personal views, not those of my employer
    6. Re:Pointless by O('_')O_Bush · · Score: 1

      Dalvik is an implementation of a JVM. Google didn't use the Oracle reference JVM, called Hotspot, because it's owned by Oracle.

      There have been other implementations of JVMs in the past by third parties, and Oracle owns none of these.

      --
      while(1) attack(People.Sandy);
    7. Re:Pointless by Vectormatic · · Score: 1

      If you are pioneering a completely new language, why not pioneer a new virtual machine, and lawyer up and make sure Oracle doesn't have any grounds to sue you?

      quite probably, building a new VM/runtime isnt all that easy, never mind attaining some performance.

      Also, lawyering up enough that larry wont go after you as soon as you say xVM, is probably impossible, he even went after google (and if there is any company capable of killing oracle, its either google or microsoft)

      --
      People, what a bunch of bastards
    8. Re:Pointless by TemporalBeing · · Score: 1

      Dalvik it NOT a JVM. The language is compatible enough that a JVM can be used for development, but the ultimate program is not a Java program.

      This is evidenced by the fact that Google did not implement a number of the JVM interfaces required to make it actually Java.

      Now, it could possibly be said that Dalvik is a derivative of Java - but no more so than Java is a derivative of C.

      If, however, Dalvik was a JVM, then any program that runs on Dalvik would be able to run in any other JVM - including Oracle's reference platform. But that is not the case. Please stop espousing Oracle's FUD.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    9. Re:Pointless by Anonymous Coward · · Score: 0

      building a new VM/runtime isnt all that easy, never mind attaining some performance.

      Oh yeah? Building a new VM is far easier than getting the whole industry to buy-in on a new language with new libraries. One person can get some sort of VM working in a few days. I don't know how long it would take to make something as big as the JVM, but I have personally written a VM in two days, and it runs fast. (My VM is more or less a copy of the FORTH VM, so it's using function addresses rather than bytecodes, if you care about the details.)

      Really, the VM isn't the hardest part.

      lawyering up enough that larry wont go after you as soon as you say xVM, is probably impossible

      There is a difference between "Oracle doesn't sue" and "Oracle doesn't have any grounds to sue". It's impossible to guarantee the former but possible to guarantee the latter.

      The key point is to have the lawyers review all the patents Oracle now owns that relate to the JVM, and make sure that either (a) you don't use those patents, or (b) you have iron-clad prior art that demonstrates just how silly those patents are.

      I refuse to believe that Oracle can have legit patents on the fundamental concepts behind a virtual machine. The prior art goes way back to the UCSD P-system in 1978, and almost certainly to before then.

      Note that Oracle hasn't sued Microsoft over the CLR. That's probably because the CLR doesn't step on any of Oracle's patents. (Or, should I say, Sun's patents that Oracle now controls.)

    10. Re:Pointless by Raenex · · Score: 1

      Oracle doesn't own the JVM - they own their reference implementation.

      They own the trademark for JVM:

      http://www.trademarkia.com/jvm-75918281.html

      They also own the trademark for Java (not gonna even bother supplying a reference for that one).

      They also own patents, and potentially copyright, that might be violated in an implementation of a JVM. Google tried to get around the trademark issue but got caught up in patents and copyrights. I wish the Oracle case against Google would get resolved soon, just to see where things stand. I suspect Google will end up settling and paying a hefty license fee to Oracle, which would still suck for other JVM implementations.

  12. >> According to the slides, ... by Looce · · Score: 0

    From TFA:

    >> According to the slides, the Ceylon Project aims to create a programming language and SDK for business computing, designed with an eye to the successes and failures of the Java. It is built to run on the JVM

    >>> the Ceylon Project is built to run on the JVM

    Whoops!

  13. Sounds like a more verbose C# by Anonymous Coward · · Score: 0

    Why not just fix JVM so that it can handle modern languages like C#? Support for true generics would be nice...
    Anyway, if you really want a cool language then give http://en.wikipedia.org/wiki/Nemerle a try

    1. Re:Sounds like a more verbose C# by telekon · · Score: 0, Flamebait

      modern languages like C#?

      You, sir, have a perverse definition of 'modern'.

      --

      To understand recursion, you must first understand recursion.

    2. Re:Sounds like a more verbose C# by narcc · · Score: 1

      modern languages like C#?

      You, sir, have a perverse definition of 'modern'.

      There are at least two ways to interpret your comment:

      1) C# has been around about 10 years and is too old to be considered 'modern'
      2) C# is not characteristic of the state-of-the-art.

    3. Re:Sounds like a more verbose C# by binarylarry · · Score: 1

      C# already exists for the JVM: http://code.google.com/p/stab-language/

      --
      Mod me down, my New Earth Global Warmingist friends!
    4. Re:Sounds like a more verbose C# by shutdown+-p+now · · Score: 1

      Compared to Java, C# is a shining definition of a modern language. Hey, at least it's got closures!

    5. Re:Sounds like a more verbose C# by msuarezalvarez · · Score: 1

      Closures has been available in good languages since essentially the egining of time. That it is now a "modern" feature only reflecs the fact that languages mostly suck...

    6. Re:Sounds like a more verbose C# by shutdown+-p+now · · Score: 2

      There are many language features that have been available for ages, especially in various Lisps. The problem is always getting those features into mainstream. Arguably, closures only got there with JavaScript, and even then it took a while for people to actually notice they're there. The first mainstream language which not only had them, but actively advertised it, with standard library build largely around the concept, was Ruby.

      (One could argue that in both cases it was rather Smalltalk, but I think that it is a matter of debate whether it was sufficiently mainstream. There's certainly no doubt with JavaScript.)

  14. Re:I like not equals assignment operators by mysidia · · Score: 2

    ":=" as the assignment operator is a case of back to the future. Pascal uses it, and for anyone who's mistakenly typed "=" rather than "==" in C/C++ it can only be a good thing.

    Why don't we just move Linux kernel development to the ADA language, before it's too late?

  15. OneToOne joins still broken by Anonymous Coward · · Score: 0

    He should stop playing and go back to fixing Hibernate

  16. hmm. by jensend · · Score: 4, Insightful

    1. Put these guys, Walter Bright, and a few other folks (Alexandrescu? a couple of the best folks from the Java and C# camps?) in a building.

    2. Lock the doors from the outside and guard the building until they've come up with the One True C++ Successor (both compilable to native code and a good target for a JIT) and the basic design for its standard library.

    3. Profit^H^H^H^H^H^H End the ridiculous situation we have where systems-level programming is held back by 40-year-old braindead technologies like the C preprocessor while the dominant business programming languages are controlled by corporations with terrible track records.

    1. Re:hmm. by MightyMartian · · Score: 1

      A-fucking-men! I want to elect you president of programming!

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    2. Re:hmm. by ADRA · · Score: 1

      "both compilable to native code and a good target for a JIT" == fail. I always find that going against the grain and trying to force deep native/managed integration to be a big fail. Most companies will do 100% one way or the other, and anyone else left straddling the fence never end up satisfied with the implementation anyways.

      --
      Bye!
    3. Re:hmm. by shutdown+-p+now · · Score: 1

      Put Walter Bright and Alexandrescu in the same building?

      What you'll get once you open the door is a bunch of dismembered bodies. ~

    4. Re:hmm. by PhilHibbs · · Score: 1

      I'd put forward Angelika Langer and Kevlin Henney as well, but I'm biased because I've had dinner with them.

    5. Re:hmm. by perrin · · Score: 1

      Oh, but this has already happened, only with different people than those you mentioned. Take a look at Go.

    6. Re:hmm. by Anonymous Coward · · Score: 0

      Language design by committee.... BRILLIANT!!

    7. Re:hmm. by Anonymous Coward · · Score: 0

      They did. It is called D 2.0.

    8. Re:hmm. by jensend · · Score: 1

      Take a look at Go vs. Brand X.

    9. Re:hmm. by jensend · · Score: 1

      This has been modded quite a bit, but as of this writing I didn't get any Funny mods- it was meant to be kind of tongue-in-cheek, but I suppose that last point was too serious.

      However, I really would like to see more cooperation and sharing of ideas between the best and brightest (Bright-est?) of those trying to replace C++ and its descendants with something better. There are plenty of candidates out there, but it will take a concentrated effort to arrive at something (or quite possibly two things, one language for native code and one for VMs) which can really take the place of languages which are so entrenched.

    10. Re:hmm. by Anonymous Coward · · Score: 0

      You do realize both of them work on D, right? So what you'll get is D. So you're right, insofar as a train wreck does tend to produce a lot of carnage.

  17. Another One! Just what we need by Virtucon · · Score: 1

    Let's see, C, C++, C#, Java, Python, Perl, Ruby, F#, VB, Fortran and even Ada still lurking about.

    We need another "language" like we need a hole in our collective heads. Like others have pointed out another language to sit on top of a JVM, meaning it will generate byte code but is it really better? I guess only time will tell.

    --
    Harrison's Postulate - "For every action there is an equal and opposite criticism"
  18. Doesn't Solve Java's Problems by Anonymous Coward · · Score: 0

    Java's syntax is not the problem.

    I thought that the problem with Java is that Oracle is controlling it, and seems to have a good chance of f*cking things up. This new language runs on top of the JVM. So, Oracle might make new versions of the JVM specifically incompatible. Now, maybe you can use the Davalik VM instead. But, Oracle is suing Google over that.

    In short, adopting this language has all the same issues that Java has.

       

    1. Re:Doesn't Solve Java's Problems by M.+Baranczak · · Score: 1

      No, Java's syntax is a problem. Not as big as the other problem you mention, but it's still a problem.

  19. This is the Virtudyne story! by Anonymous Coward · · Score: 0

    Exactly. This sounds exactly like the Virtudyne business model: Writing a MS Office killer in... brace yourselves... Visual Basic for Applications (VBA)!!

    "This is the first article in a four part series that tells of the rise and fall of Virtudyne, one of the largest privately-financed ($200M) disasters in our industry." A truly epic failure.
    (A link to the actual company, that, I think, still exists, can be found in the comments.)

    1. Re:This is the Virtudyne story! by Anonymous Coward · · Score: 0

      SimDesk. It's a funny story, but like everything, 90% bullshit.

  20. D anyone? by Anonymous Coward · · Score: 0

    What about the D language?

  21. Missing feature in Java: Copy on write by Michael+Woodhams · · Score: 4, Insightful

    My number 1 missing feature in Java is the ability to set object references to be 'copy on write'.

    I'm doing numerical/scientific programming. Say I have an object which contains an array, and a 'get' function to return that array. Currently I have two choices: I can return a pointer to my object's array, or make a copy of the array and return that.

    Returning a pointer is very fast, but now my class is at the mercy of callers which might write into my array. Returning a copy is safe, but so long as the callers behave themselves and don't try to write to it, is a waste of time and memory. If I could return a "copy-on-write-reference" to my array, I'd get the best of both worlds.

    Any reference reached via a copy-on-write-reference would also need to be copy-on-write. If you make copy-on-write a qualifier on a variable, this could be all enforced by the compiler.

    Are there any languages which do something like this?

    --
    Quattuor res in hoc mundo sanctae sunt: libri, liberi, libertas et liberalitas.
    1. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      CopyOnWriteArrayList ..?

      http://www.javamex.com/tutorials/synchronization_concurrency_8_copy_on_write.shtml

    2. Re:Missing feature in Java: Copy on write by dakameleon · · Score: 1

      I can imagine it being cleverly implemented in something like LLVM, but that really says to me that you need to better define the boundaries in your program/algorithm. What's the use-case for write-to-copy beyond the abstract example above?

      --
      Man who leaps off cliff jumps to conclusion.
    3. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Are there any languages which do something like this?

      Yes there is a lot of languages that can do that.... it's called abstraction :), return an "Array" that copies it's contents at the moment of setting values, you can do that in almost any OO programming language, in some of them you can even have the "get" method named with a "[ ]" syntax.

    4. Re:Missing feature in Java: Copy on write by Jeremi · · Score: 1

      If I could return a "copy-on-write-reference" to my array, I'd get the best of both worlds.

      I like the copy-on-write idea, but there is another possible solution also: do what C/C++ do, and allow the method to return a const pointer. That way callers are allowed to read the array but they aren't allowed to modify it. This would have the advantage of being somewhat simpler, and also requires no runtime overhead (const correctness can be enforced solely at compile time).

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    5. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      The feature you want is called a "persistent data structure". Functional languages have these by definition, and some of them even have some very advanced ones. The far-and-away leaders in this department right now are Scala and Clojure, both of which sport nearly-O(1) vector, hashmap and hashset implementations which maintain persistence. By comparison, copy-on-write is always at least O(n).

    6. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Why don't you return a CopyOnWriteArrayList?

    7. Re:Missing feature in Java: Copy on write by Michael+Woodhams · · Score: 1

      My problem isn't that I don't know the boundaries of my algorithm, it is that I can't enforce those boundaries cheaply. Another way of looking at it is I'm writing a library function, and I don't trust the library's user to know the boundaries of my algorithm.

      --
      Quattuor res in hoc mundo sanctae sunt: libri, liberi, libertas et liberalitas.
    8. Re:Missing feature in Java: Copy on write by Michael+Woodhams · · Score: 1

      Nice - I didn't know this one, and may use it.

      However, it is a hand-crafted solution for one single data structure. I want something I can paint onto any data structure with a single keyword, and let the compiler deal with it behind the scenes.

      --
      Quattuor res in hoc mundo sanctae sunt: libri, liberi, libertas et liberalitas.
    9. Re:Missing feature in Java: Copy on write by willy_me · · Score: 1

      Well with (MacOSX | GNUStep | OpenStep) you would typically work with a "NSMutableArray" object. This is a standard array type object that you can modify. Your class can then provide a reference to this array in the form of a "NSArray" object - an object that can not be modified.

      Inheritance works as follows: base object (NSObject) -> static array (NSArray) -> dynamic array (NSMutableArray).

      So you can always typecast your dynamic array as a static one when sending to possible callers. This technique can be used in any OO based language. It doesn't guarantee that callers play nice with your array but it does prevent it from happening by accident.

    10. Re:Missing feature in Java: Copy on write by shutdown+-p+now · · Score: 1

      Copy-on-write is a performance bottleneck for heavy parallelization, however (and sometimes even not so heavy), since you then need a lock for every access.

    11. Re:Missing feature in Java: Copy on write by Michael+Woodhams · · Score: 1

      While not as powerful as my suggestion, I think that every time I've wanted this feature, the C++ const pointer would have sufficed.
      To do it properly, not only does the object pointed to have to be unmodifiable, so too do any objects contained within that one, which C(++) does not do. (I.e. any pointer obtained via a 'const' pointer is also 'const'.)

      I've just found a couple of discussions on this -
      http://www.velocityreviews.com/forums/t150742-how-do-java-programmers-cope-with-java-missing-c-const.html
      http://www.javamex.com/java_equivalents/const_java.shtml

      --
      Quattuor res in hoc mundo sanctae sunt: libri, liberi, libertas et liberalitas.
    12. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Java is an OO language - if a class uses an array as its internal data structure then that should be of no concern to its collaborators. The very fact that you want other classes to get hold of that array at all, indicates to me that you have a problem with your design.

    13. Re:Missing feature in Java: Copy on write by RzUpAnmsCwrds · · Score: 1

      The solution to this is to have the return type be an interface/class that doesn't support assignment.

      For example, I frequently write immutable objects that contain lists. Returning a reference to the internal List would make the object non-immutable (since you can modify the list contents). Instead, I can return Iterable which disallows assignment.

      Of course, there are performance penalties for wrapping every array in a collection class. But they aren't so bad, and there are much bigger fish to fry in scientific/numerical Java from a performance standpoint (like mandatory bounds checking for every access).

    14. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Have you looked into CopyOnWriteArrayList? or the NIO stuff?

    15. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      C++ lets you do this fairly elegantly. You could probably roll your own in Java that emulates that, but it would be more cumbersome internally.

    16. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Why don't you use CopyOnWriteArrayList? This only does exactly what you asked for.

    17. Re:Missing feature in Java: Copy on write by bluej100 · · Score: 1

      Copy-on-write is actually PHP's default behavior--you have to go out of your way to pass arrays by reference--but, heh, that's probably not the answer to your memory optimization concerns.

    18. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Actually this is one thing you wouldn't need to do as long as you can't pass a copy-on-write pointer by ref.

    19. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      objective c

    20. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      you're looking for right-hand semantics. that's one of the optimizations in the new c++ standard.

    21. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      In C++ you can always return a const reference or const pointer.
      If someone wants to make changes they then have to manually copy the array (very easily done using copy constructors).

    22. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Matlab does this.
      I found out the hard way while interfacing a C++ application to the matlab engine.

    23. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Not really a language feature, more a library feature... if your looking for CopyOnWrite why not google CopyOnWrite, you'll get an autocomplete for CopyOnWriteArrayList:

      http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/CopyOnWriteArrayList.html

    24. Re:Missing feature in Java: Copy on write by LongearedBat · · Score: 1

      I'm not aware of any language that does that. But you could write a class to do that for you, and if you can use inline'ing (or bypassing getters/setters, see below), then it would be efficient too.

      The class would be a generic wrapper around an array. The setter method would check to see if it's accessing the original array, and if so would duplicate the array before setting the value.

      Some languanges, such as Delphi, allow getters and setters to access fields directly without the need for methods (though unfortunately not to array elements, which would be ideal in your scenario).

      For example (in Delphi):

      TMyClass = class
      private
      _MyField: string;
      procedure SetMyField(Value: string);
      public
      property Myfield: string read _MyField write SetMyField;
      end;

      so...

      var
      MyObj: TMyClass;
      begin
      MyObj.MyField := 'Foobar'; // Calls the setter method
      ShowMessage( MyObj.MyField ); // Gets the value of _MyField directly

      Handy for reducing uneccessary getter and setter code, which would be good for compact devices. So that's on my wish list.

    25. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Under the hood, Haskell.

    26. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 1

      Are you using actual arrays or any of the collection types like Collection, List, ArrayList, LinkedList, ect?

      You may want to use the latter because then you can use Collections.unmodifiableCollection() and friends. If your class returns unmodifiable collections it's callers will be responsible for copying using something like List copy = new ArrayList(someObject.getCollection()); And as the caller knowns when it is going to modify a collection and when it is merely going to iterate, there is no duplication of work.

    27. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Take a look at Qt's implicitly shared container classes, they're awesome:-

      http://doc.trolltech.com/latest/implicit-sharing.html

      http://doc.trolltech.com/latest/qvector.html

    28. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      You mean, something like http://download.oracle.com/javase/6/docs/api/java/util/concurrent/CopyOnWriteArrayList.html?

    29. Re:Missing feature in Java: Copy on write by SplashMyBandit · · Score: 1

      We wrestled with this design choice for years. In the end we return direct access to the array. It is very efficient (as you point out) and sometimes your client needs that access to get something done (usually some use you didn't foresee). As long as things are documented properly it is better to require that the client know what they are doing and avoid being 'straightjacketed'. If you have to tight a straightjacket (try to hard to protect them from themselves) they can't use your class and end up re-implementing your class themselves so they can have the required access. I come across classes that try to protect me from myself too much and that is a far worse problem then me modifying them incorrectly. Basically, design 'Java Beans' where you can and your classes will be easy to re-use. Document you are returning a modifiable instance and trust your client to read the javadoc (if they screw up and cant read simple docs then that isn't your fault). If the client is you alone and you are protecting yourself from your own code to this degree then I suggest you might find your time spent better by doing productive things (more features, more unit tests) than trying to make your code 'foolproof'. This is my experience (around two decades of C/C++ and Java - both writing my own libraries and using a lot of libraries written by others).

    30. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      What's the difference (programatically) between sending a copy and sending a copy on write? If the language supports copy on write then whenever you send a copy the language can take care of the rest... yeah?

    31. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Just implement Clonable.

    32. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      That's silly. Just make it read only (as in const) and let the caller deal with copying.

    33. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      That's really easy to do in any language. You return a copy of the array of pointers to the original objects. see http://en.wikipedia.org/wiki/Object_copy

    34. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      My number 1 missing feature in Java is the ability to set object references to be 'copy on write'.

      I'm doing numerical/scientific programming. Say I have an object which contains an array, and a 'get' function to return that array. Currently I have two choices: I can return a pointer to my object's array, or make a copy of the array and return that.

      java.util.concurrent.CopyOnWriteArrayList?

    35. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      There are languages doing this implicitely. Some C#'s objects (like string, arrays, etc) are implicitely shared (copy on write). Also, in C++, Qt framework is using implicitely shared objects (copy on write) quite heavily (QString, QVector, QList, etc.). It's basically a very good idea.

      The problem is this: using these objects in multi-threaded environment. They all claim (at least in Qt's documentation) it's safe under these conditions, but I know at least from Qt, that this is not the case. In fact, it's quite easy to write a program to demonstrate this. The copy-on-write is not fully thread-safe in Qt!

      Given, in 99% of all cases, there is no problem at all...but there are circumstances where such ugly bugs are introduced...and damn, they are hard to pin down (I was going through this). I don't know how C# (or MFC for that matter) are solving the copy-on-write to be thread-safe (or if they actually are), but I don't trust it. Also, there is little to none documentation about it.

    36. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Some people are trying to get there (http://www.digitalmars.com/d/2.0/memory.html) but it is still far from being a language feature.

    37. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Wrap the array in a simple class with get(index) and set(index,value) methods. The set method does the COW logic, i.e. copies the array if not yet done (you'll need a flag that says whether you already have a private copy). If needed, you can "lock against changes" in a similar way, using another flag or an enum instead of a flag, e.g. make the setter do nothing or throw an exception.

      Make the class final so you don't sacrifice performance for this. If you can't make the class final, make the methods final. Either way should be enough for the JVM to know that the method call doesn't require a virtual method lookup.

      Make the getter that returns the array return a COW-"copied" new instance.

    38. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Look for Java Collections class. You can create 'unmodifiable' version of you List, Map, ... . Than calling code is responsible to create copy when they want to change you array. Copy on write isn't help here. I can't imagine how it will work.

    39. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Actually, it's not missing.

    40. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Easy: make your class / implementation immutable, and make all mutator functions return a new object.

      Should be easy enough in C++ and Java.

    41. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      C++ comes close by allowing you to return a "const reference". That is (obviously) as fast as returning a reference, but without the lack of safety because the compiler enforces the "behavedness" of the caller. If and when the caller needs writable data, they can copy it into their own object.

    42. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      There are Java data structures which provide this. You could wrap it in a list:

      return Collections.unmodifiableList(Arrays.asList( ... ));

      Or create a copy on write list:

      List myList = new CopyOnWriteArrayList();

    43. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      You're looking for the language "Clojure" that runs on top of the JVM. It does "CoW" very efficiently using transient datastructures etc.

      A very nice language but a bit of a "research" language.

      As a side note: that "Ceylon" thinggy that says "everything is really an object", like every language that claims to be "pure OO", to me sounds like "I'm a wuss, I fear scientific applications". Scientist *DO* need access to fast primitives array. Don't know how Clojure fares from that point of view that said. You'll need to look it up yourself.

    44. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      There are languages that support this (C# is doing this with some classes, like String class). It's called implicitely shared objects. I don't trust them to the fullest. Let me elaborate:

      Implicit sharing (copy-on-write) is supported in Qt (C++ framwork). Classes like QString, QVector, QList etc support this. In their documentation, they also say that their implementation is thread safe. In fact, it is _not_ thread safe. The copy on write would have to be atomic. This can easily be proven by a simple program (and as QT is open source, viewed directly in their implementation). See http://www.folding-hyperspace.com/program_tip_15.htm

      So, in 99% of cases, it's safe mechanism, but when using multi-threading heavily, it's not safe at all (and can lead to hard to find bugs...I went that road. It's really ugly). So while the concept has its merits, it can potentially lead to unsafe code quite easily.

      Other frameworks that say they support it are not specific about their implementation...so we basically can't know if it's really bulletproof. Not something that spreads confidence.

    45. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      I'm doing numerical/scientific programming.

      With Java?

    46. Re:Missing feature in Java: Copy on write by gbjbaanb · · Score: 2

      Some C++ STL String implementations used CoW, they've all dumped them - in the end the cost of memory copying was smaller than the (rather huge) penalty for making sure it worked correctly in a multi-threaded, thread safe environment.

      Turns out its quite hard to do fast CoW if you have to lock the contents before writing to it.

    47. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Any reference reached via a copy-on-write-reference would also need to be copy-on-write. If you make copy-on-write a qualifier on a variable, this could be all enforced by the compiler.

      Are there any languages which do something like this?

      Not as a qualifier, but you can do this quite easy in C, with the right underlying file-system and OS. Create a file for your array (you can do this in a fs residing in RAM memory, no hard disk is needed), mmap to your pointer, fill with content, copy the content of the file to a new file (with the right FS, a Linux-based OS will do lazy copying, it's really fast), mmap to a new pointer, now you can use both "arrays" independent of each other. Only file-blocks that gets overwritten after the split will take extra space. If the data is processed sequentially, then pipes are really neat and saves time and memory.

      I think TCL, ghostscript, R, some logo and forth interpreters, many functional language implementations and a possibly a lot of other interpreters, do copy on write for arrays automagically. I'm not sure I remember which language implementations that do this and I'm to lazy to re-read their code, but there are definitely a lot of languages that do copy on write for arrays automagically. I would have guessed Java did this too (never read any code for java implementations). Most SIMULA implementations handled arrays like that, so it's not a new idea.

    48. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Qt's container classes (and many others) are implicitly shared, which is just what you want. See the Qt documentation on implicit sharing for more information.

    49. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      That's a neat idea, but I bet you can get pretty close on your own (with existing languages).

      - Don't return the array directly. Instead, use a bit of indirection and return a class that wraps the array.
      - Add a clone operation to create new CoW instances.
      - On a read operation (indexed property get). Just return the cached (shared) array.
      - On a write operation, make a copy of the array and replace your shared copy. (and flag it so you don't do it again)
      - Depending on your needs, you may need to cache your cloned children (if you write to an ancestor -- you need to cascade clone).
      - If your JITer is good, the method calls for the (trivial) index operators should get inlined.

      Another approach would be to make all of your arrays immutable once fully constructed (enabling safe sharing).

      Both of these increase cost slightly (more branching, indirection), so the memory savings will (obviously) come at some performance cost. If your reads vastly outnumber writes over the lifetime of your objects, it might be worthwhile though.

    50. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Here you go:
      http://download.oracle.com/javase/6/docs/api/java/util/concurrent/CopyOnWriteArrayList.html

      I know it's a List rather than an array, but lists are better any way.

    51. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      That sounds like something that should be handled by a collections API, not a core language. Perhaps apache commons collections or guava collections might have something that would suit you.

      Mind you, these APIs work on collections, not arrays, so maybe performance would not be quite as good. However there's nothing stopping you from wrapping an array in an object that would handle all of this logic for you.

    52. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      You could always return an unmodifiable list backed by the array from the Collections class. providing the objects you store in your array are immutable its completely safe, if not you're actually asking for the compiler/vm to handle implicit deep copying of objects which noone has done yet.

      So your answer is yes. Java did it in 1.5 with the Collections framework and has given you the ability to do it yourself since 1996. I'm sure there is a simple way to do it with .NET as well, also probably since its incarnation as well.

      Before you bad mouth a language for not doing your job for you why not stop and think about the problem first

    53. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      techical term is "lazy loading" i think. if you desperately need it, can't you just write a wrapper class around the array which has a copy on write method?

    54. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      >Returning a pointer is very fast, but now my class is at the mercy of callers which might write into my array.

      No, no its not.

      You could always return an unmodifiableCollection of the array. Look into Collections class and its static methods.

    55. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Can't you simply create a datastructure for this? Like

      class CopyOnWriteArrayList implements List{
      Object[] array; boolean copied = false;
      get(int index){return (T)array.get(index);}
      set(int index, T val){
      if(!copied){ array= copyArray(array); copied = true}
      return array[index];
      } //...
      }

    56. Re:Missing feature in Java: Copy on write by abacus1 · · Score: 1

      My number 1 missing feature in Java is the ability to set object references to be 'copy on write'.

      I'm doing numerical/scientific programming. Say I have an object which contains an array, and a 'get' function to return that array. Currently I have two choices: I can return a pointer to my object's array, or make a copy of the array and return that.

      Returning a pointer is very fast, but now my class is at the mercy of callers which might write into my array. Returning a copy is safe, but so long as the callers behave themselves and don't try to write to it, is a waste of time and memory. If I could return a "copy-on-write-reference" to my array, I'd get the best of both worlds.

      Any reference reached via a copy-on-write-reference would also need to be copy-on-write. If you make copy-on-write a qualifier on a variable, this could be all enforced by the compiler.

      Are there any languages which do something like this?

      That's exactly how the current implementation of std::string works in C++. The techniques that have been used to implement that mechanism can be applied to any other reference-counted C++ class.

    57. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      You can easily achieve your desired behavior using wrapping classes.

    58. Re:Missing feature in Java: Copy on write by master_p · · Score: 1

      There is nothing in Java that prevents this sort of thing. You can easily write a wrapper class which contains a reference to your array, then have this wrapper class duplicate the array the first time the array is modified.

    59. Re:Missing feature in Java: Copy on write by kaffiene · · Score: 1

      It's called escape analysis and it's been around in JVMs for a while now. It's better than what you've suggested because it doesn't need extra keywords and it applies anywhere that it can be employed - if one usage needs a defensive copy and another does not it can optimise the latter while still allowing the former.

    60. Re:Missing feature in Java: Copy on write by mrsam · · Score: 1

      Are there any languages which do something like this?

      Yes, C++ actually. You've just described how std::string works, I believe.

    61. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      You're doing it wrong

    62. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      There is work on Java regarding that, but like most new Java ideas, they're a bit stuck.

      Michael Ernst has a good number of articles on this:

      http://www.cs.washington.edu/homes/mernst/

      Also note that you can make Collections immutable. Of course, Java arrays themselves cannot be made immutable.

    63. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0
    64. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Tcl. Basically everything is pass-by-value semantics with pass-by-reference COW under the hood

    65. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Sir,

      You're not doing your encapsulation right.

      Instead of returning naked objects, return wrappers around objects. With introspection, you could even write a generic one.

      But the language or runtime should provide this facility you say?
      Just think about how you'd have to specify the COW semantics...

      Fif.

    66. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Use a List instead of an array, and return an unmodifiable view of the list (using Collections.unmodifiableList(originalList)). If the caller wants to modify the list, then he just has to copy the list inside a new one.

    67. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Matlab.

    68. Re:Missing feature in Java: Copy on write by gjn · · Score: 2

      They're awesome...and they're probably the most dangerous things in the whole Qt framework. They promise in documentation that it's usable in multi-threaded environement, when in fact they are _not_ usable there. Which renders using Qt in multi-threaded applications an adventure toward undefined behaviour. Qt's implicitely shared classes are NOT thread safe. It's easy to write a program demonstrating this: http://www.folding-hyperspace.com/program_tip_15.htm Given, it's wonderful approach for maybe 95% of applications. But I don't know how much time we wasted investigating for this before we finally discovered this flaw (and we discovered it by chance). It's not only limited to Qt. Qt is just open source and documented quite openly. As I know, MFC, C# and some other languages alos use CoW (or implicit sharing) and you can't find any documentation or implementation details about them. This is not comforting.

    69. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      hmmm... Don't use arrays (use lists instead), and return an immutablelist ...?

      Also, who cares about time and memory? By the time the software is out, Moore will have fixed it... You're optimizing, so:
      "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil"
      "The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.”

    70. Re:Missing feature in Java: Copy on write by Lomby · · Score: 1

      Data structures in functional languages behave exactly in this way:

      http://en.wikipedia.org/wiki/Purely_functional#Examples_of_purely_functional_data_structures

    71. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      chances are no. But java has something that takes care of that, kinda. See the Collections class It's a utility class for collections that among other things allows you to make a collection unmodifiable

    72. Re:Missing feature in Java: Copy on write by gjn · · Score: 1

      Take this with a huge grain of salt. http://www.folding-hyperspace.com/program_tip_15.htm

    73. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      I'm not aware of a compliler that does this, but this falls under the label "persistent data structures". While this is a relatively recent topic of discussion among Java, C#, and script language developers, it has along and storied history in the functional programming world.

      However, I'm not aware of any persistent data structure that preserves the speed of an array structure (defined as a simple integer valued offset from a base memory address). Even when integer offset indexes are available (e.g., Java and C#), the actual contents are pointers to heap allocated data--assuming boxed data types of course, unboxed primatives are likely stack allocated. There are few modern equivalents to Fortran and C arrays and I know of none that add "copy-on-write" or persistence.

      However, something like 2-3 finger trees (look for the Ralph Hinze papers, too lazy to goole it myself) may make sense, and there are tons of other data structures if you can handle a little slower lookup operations.

    74. Re:Missing feature in Java: Copy on write by Misagon · · Score: 1

      I have come across languages in the research realm that present value semantics for the user, but have copy-on-write semantics underneath the hood.

      However, to make the language able to guarantee this behaviour, and for multithreaded/parallel programs and without impairing performance that is not so straightforward.

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
    75. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Please let me know if you find such a thing. cmsdew@gmail.com

      Thanks,

      Chris.

      P.S. Related issue: http://www.barricane.com/2010/02/07/immutable-containers-in-scala.html

    76. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      what you are looking for is a read only type system.

      afaik only academic non commercial languages support such a type system.

      However, you can implement your own wrapper around the array, e.g. ReadOnlyArrayList which only provides methods for access but not write access to the collection itself. You would however still face the problem of people mutating the objects inside the list, but that is a different problem.

    77. Re:Missing feature in Java: Copy on write by Hooya · · Score: 1

      Is this what you're looking for?

    78. Re:Missing feature in Java: Copy on write by Tupper · · Score: 1

      This is best understood in the context of mutability/immutability.

      Mutable structures---like arrays--- have problems with ownership and thread safety. Before you pass it to a method you must copy it, if the method might change it. If someone passes you an array, you may need to make a copy before working with it. Also, mutable structures must be invariant for type safety.

      Immutable structures solve these problems but they are more complicated. Consider the immutable vectors from Clojure or Scala--- they have an array-like api but are immutable. They are implemented as wide trees, so a logical read or write may take 5 or 6 actual read or writes.

      Immutable structures are easier to reason about. And defensive copies and monitors are not required for bug-free operation. But there is a trade off.

      A copy-on-write array can have good read performance. The sticky part is the write, which is O(N). If writes are infrequent or can be batched, this may be ok. Java's String class has copy-on-write semantics.

    79. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      functional languages do. you'll have to research exactly the features and limitations of each. I suggest you take a look at Scala, since it's java-compatible :)

    80. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Okay, someone clearly isn't a computer scientist, even if he/she is a scientist.

      You're complaining about the difference between pass by value and pass by reference (Java is pass by value, 100% of the time, anyone who takes issue with this needs to go back and read about it).

      In answer to your question, yes, the language that you're looking has been around for awhile: C++. It won't mean any less work for you, though, you still get to write copy constructors. If you want to skip learning an obtuse language like C++, then I suggest making use of Object.clone(), that's what it's there for (you'll have to deep clone, otherwise you'll only be cloning your List implementation and each element will still point to the same object in memory).

      You're having trouble with the concept of encapsulation, your getList() method should take care of any details (like cloning or whatever) before returning a reference to your List object. Yes, you need to do some work, if your objects are simple enough you need to do some reading for some shortcuts (hint the Apache project has you covered).

      I'm picking on you a little bit only because it's people like you who do a lot of illegitimate complaining about solved problems. I understand neither Computer Science nor Java is your primary concern, but if you're going to pick a complex tool to assist you in your job you owe it to yourself to learn how to use it.

    81. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      I believe Clojure does..

    82. Re:Missing feature in Java: Copy on write by ByteSlicer · · Score: 1

      Java's String class has copy-on-write semantics.

      No. String is immutable. It contains some methods that return an altered copy though.

    83. Re:Missing feature in Java: Copy on write by Jonner · · Score: 1

      It seems like you should be able to add COW behavior in your data structure's class rather than requiring an addition to the core language. Of course, Java is pretty restrictive, so you probably can't do that with an Array, but you could with your own Array-like class.

    84. Re:Missing feature in Java: Copy on write by increment1 · · Score: 1

      CopyOnWriteArrayList will not solve your problem. The name refers to an implementation detail used to handle concurrent access, and does not result in a copy of the array list being made (just the underlying backing array). This does not help you at all, since you cannot get direct access to the underlying backing array anyway, and creating a CopyOnWriteArrayList from an array will result in an immediate copy of the passed in array being created (so this is no better than just defensively copying before you return).

      The best you can do in Java is Collections.unmodifiableList(Arrays.asList(myArray)); which will give you an unmodifiable list view of the array, backed by the array (so no copy is made). For small arrays, this will probably not be any better than defensively copying the array via System.arraycopy (and may possibly be worse), but for large arrays, there should be an improvement (if not in speed, then at least in memory).

    85. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Returning a pointer is very fast, but now my class is at the mercy of callers which might write into my array. Returning a copy is safe, but so long as the callers behave themselves and don't try to write to it, is a waste of time and memory. If I could return a "copy-on-write-reference" to my array, I'd get the best of both worlds.

      Any reference reached via a copy-on-write-reference would also need to be copy-on-write. If you make copy-on-write a qualifier on a variable, this could be all enforced by the compiler.

      I don't see how "as long as the callers behave themselves" problem is solved by this. I can see it saving memory, but not knowing what will get modified has nothing to do with manual (shallow, deep?) copies or automatic copies (deep??).

    86. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Take a look at clojure's immutable data structures, they solve the problem. You can guarantee that no-one will write to your data, and it is built that way from the ground up.

    87. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      There are languages that have immutable data structures that are reasonably efficient (O(log n) access and update), but not exactly the same as traditional arrays (O(1) access and update), such as Clojure's vectors. You can safely return a reference to them and know that the language enforces that it is immutable. The caller can create a new vector that is the same as the existing one in O(log n) time, that shares most of the storage of the original, but does not modify the original. Haskell must have such things implemented for it, too, although I don't know what it would be called. I suspect many languages with a functional programming inclination to them either already have such a data structure, or one could be implemented in it. The differences between such languages are whether the data structure is easily usable in many places in the language, rather than only with code specifically designed to handle it. In Clojure, at least, it is one of the fundamental data types that everyone knows about.

      Without leaving Java, you could create your own Java class that behaves like a copy-on-write array. But this would have the problem mentioned above: it could not be accessed with the same syntax as a Java array, and methods expecting a Java array could not take it as a parameter. You'd have to write new code to take the new data type.

    88. Re:Missing feature in Java: Copy on write by SoftwareArtist · · Score: 1

      You mean something like CopyOnWriteArrayList?

      From your description, though, I don't think you really want copy on write. You just want an object that provides read access to your data without allowing it to be modified. That's trivial to write, and the JIT will inline the accessor calls, so there's no negligible overhead.

      --
      "I'm too busy to research this and form an educated opinion, but I do have time to tell everyone my uninformed opinion."
    89. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Return the array as read-only and let the client copy it if they want to write to it. That way both the object providing the array knows its not going to be interfered with, and the client knows that the new array is unique, and does not falsely believe the original provider also references the new array. Use the original provider's interface to modify the array.

    90. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      You're looking for immutable variables or types. Check the google-collections for Java or look at Scala that has such and a number of goodies.

    91. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      What you want to have is already done by Clojure, another JVM language resembling LISP. All it's collections are immutable but changeable. If you change a collection, a new object is created which references the data from the old object and the changed data. Can't say anything about it's numerical performance though.

    92. Re:Missing feature in Java: Copy on write by badkarmadayaccount · · Score: 1

      Not if you use the MMU.

      --
      I know tobacco is bad for you, so I smoke weed with crack.
    93. Re:Missing feature in Java: Copy on write by maraist · · Score: 1

      apache commons has a copy on write library (can't find it at the moment).. Here's what I found on google:
      http://www.java2s.com/Code/Java/Collections-Data-Structure/CopyOnWriteArrayList.htm

      It actually works well for concurrency too - you don't have to synchronize read access.

      Copy-on-write maps are particularly good as well.

      I'm not exactly sure what you're asking for though. You're wanting compile time detection that a data-structure is contractually guaranteed to not change, and thus return a reference, but if the compiler somehow detects that a particular call will explicitly make changes, then instead perform a pre-emptive clone.

      You can already accomplish this with value-objects.. Namely use classes with private fields, getters, no setters and a constructor for initialization. If you need to change the contents, you explicitly clone.

      You can also take a cue from the C++ 'best practices' and use explicit ref-counting. By convention the returner decrements a ref-count before returning (e.g. via finally). The caller increments the ref count.. It gets passed around.. If you ever need to modify the structure, you check the ref-count - if zero you modify.. Else you clone prior to modification. C++ can hide this slightly better than java in that you get immediate-execution auto-destructors, though you have to pay extra performance for thread-synchronization.

      There is nothing preventing a VM vendor from extending an object class so you can mark it as copy-on-write ref-counted. I'm not sure that this really buys you as much as you think it would though. For little 5 field classes, there can't possibly be any benefit of constant ref-count adjustments. For large byte-arrays - the hidden magic clone could be a major memory hog. For arrays in between, you might as well just use data hiding and do the copy-on-write yourself as I've outlined above. I just don't see a region where this buys you anything without incuring major headaches.

      --
      -Michael
    94. Re:Missing feature in Java: Copy on write by Anonymous Coward · · Score: 0

      Use an UnmodifiableList and let the caller decide if they want to make a copy.

      The code is something like:

      public List myMethod() {
            Array myArray = ... ...
            return Collections.unmodifiableList(Arrays.asList(myArray));
      }

      and the caller does something like this if they want it writeable:

      List myList = obj.myMethod();
      List myWriteableList = new ArrayList(myList);
      myWriteableList.add(newData);

  22. Sadly, I have seen this movie before... by bogaboga · · Score: 0

    ...and nothing has come of it!

    Those movies involved languages like Groovy, Scala, Jython, JRuby, C# and so on.

    Nothing will beat Java as a language. Nothing! And with Google's Android using the 'Java' language. The fruits of the Ceylon project will, as the saying goes, be 'dead on arrival.'

    1. Re:Sadly, I have seen this movie before... by bloodhawk · · Score: 1

      Sorry but that is absolute garbage, lots of languages are currently way ahead of Java, especially C#. Java's advantage at this point is purely in the JVM where their cross platform strategy quite often make it the more sane choice regardless of the shortcomings of the language.

    2. Re:Sadly, I have seen this movie before... by cslax · · Score: 1
    3. Re:Sadly, I have seen this movie before... by Anonymous Coward · · Score: 0

      ...and nothing has come of it!

      Those movies involved languages like Groovy, Scala, Jython, JRuby, C# and so on.

      Nothing will beat Java as a language. Nothing! And with Google's Android using the 'Java' language. The fruits of the Ceylon project will, as the saying goes, be 'dead on arrival.'

      Huhhh, have you been paying attention to the growing Groovy and Scala market? Not that I'm a Groovy or Scala fanboy (been doing Java/J2EE/JEE for over a decade now). But the trend is obvious. Case in point, last year I went to an Oracle seminar on ADF, and it was incredible the amount of Groovy interoperability Oracle put in their tools. It's as if they are surreptitiously selling Groovy as an scripting/integration glue language to go along Java (or even replace Java in everything except the back-end heavy lifting.) I know that in the West Coast Scala contracts are up and growing. I'm in South Florida (which is a barren wasteland when it comes to innovation) and I know of several large companies doing massive work with Groovy.)

      Obviously Java will never go away, so the "Java Killer" theme spouted by the Ceylon folks is rather silly. But it is equally silly to not see the trends. Businesses are moving part of their core components into non-Java programming languages on the JVM (with clear ROI.) Many companies have already moved their entire web UI stock out of Java and into JavaScript. The change is not crazy or revolutionary, but simply steady, something dictated by logic and necessity.

  23. Re:Another One! Just what we need by Anonymous Coward · · Score: 0

    Let's see, C, C++, C#, Java, Python, Perl, Ruby, F#, VB, Fortran and even Ada still lurking about.

    ...

    And, just for completeness, there is D, Pascal, Algol, Lisp, Tcl, Snobol, et cetera, et cetera.

    One the other hand, the fact that, after each of these arrived on scene, yet another was developed -- this could be used to argue, using proof by induction, that yet another will occur, and stake out a piece of territory, necessary or not. (Ad infinitum?)

  24. Re:I like not equals assignment operators by functor0 · · Score: 1

    := was originally an ALGOL 58 feature, but I digress. The real problem is not with operator ==, but with C allowing assignment in the conditional part of if statements.

  25. lvalue on the right by Compaqt · · Score: 1

    The thing with the confusion about equality vs. assignment operator is a valid concern, but the := operator doesn't really appeal to me (initially).

    Because the bugs associated with mistakenly using = vs. ==, I always put the constant value being compared on the left. That, of course, can't be assigned to, and the compiler will catch your error if you use =.

    if (SOME_FLAG = this.x) //compiler flags this
    if (SOME_FLAG == this.x)

    Same goes for other languages with this syntax (PHP, Javascript, C/C++).

    --
    I'm not a lawyer, but I play one on the Internet. Blog
    1. Re:lvalue on the right by dakameleon · · Score: 2

      You're not always comparing with a constant; far safer is to wrap the variables with accessor methods, so you get a break if you try

      if (objectA.getX() = objectB.getX())

      It might be a bit more effort to type up, but it catches a bunch of easy gotchas.

      --
      Man who leaps off cliff jumps to conclusion.
    2. Re:lvalue on the right by caseih · · Score: 2

      Oh wow, are you serious? If this is the kind of verbosity that Java requires, I am definitely not sad to not be a Java developer. Guess the toy dynamic languages (Python, etc) have spoiled me.

    3. Re:lvalue on the right by shutdown+-p+now · · Score: 2

      Or maybe you should use a compiler that warns when "=" is used in a conditional expression, and compile with "warnings as errors".

    4. Re:lvalue on the right by Compaqt · · Score: 1

      Well, I don't think you'll get warned about that in Javascript/PHP, so I just make it a general habit.

      By the way, which compiler does that (asking, not accusing)? What's the switch for that in gcc?

      --
      I'm not a lawyer, but I play one on the Internet. Blog
    5. Re:lvalue on the right by SplashMyBandit · · Score: 1

      You have obviously never been on a *huge* software development project. The reason you use accessors and mutators (getters & setters) is so you can change the underlying representation without breaking all the uses in you million lines of code.I've had to make changes to underlying representation without breaking th client contract (signature). This is why such practices are used (plus, these methods are auto-generated by most tools anyway).

    6. Re:lvalue on the right by SplashMyBandit · · Score: 1

      You mean like the Java compiler (or the Eclipse or Netbeans incremental compilers)

    7. Re:lvalue on the right by ModMeFlamebait · · Score: 1

      Well, Python has the @property decorator that achieves the same thing without changing the signature and without generating massive amounts of boilerplate code.

      --
      Pavlov. Does this name ring a bell?
    8. Re:lvalue on the right by TeXMaster · · Score: 3, Interesting

      You have obviously never been on a *huge* software development project. The reason you use accessors and mutators (getters & setters) is so you can change the underlying representation without breaking all the uses in you million lines of code.I've had to make changes to underlying representation without breaking th client contract (signature). This is why such practices are used (plus, these methods are auto-generated by most tools anyway).

      Well, in Ruby (which is a fully OOPL) getters and setters are used too, but the language syntax allows you to define methods such as 'property' and 'property=' so that setters and getters look exactly like direct access, and much less verbose than the dreadful getPropX() and setPropX() methods you usually have in Java or C++.

      --
      "I'm never quite so stupid as when I'm being smart" (Linus van Pelt)
    9. Re:lvalue on the right by nedlohs · · Score: 1

      -Wparentheses which is included in -Wall which surely no one actually doesn't use...

    10. Re:lvalue on the right by gmack · · Score: 1

      Also -Werror for fixing programmers who are too lazy to fix warnings.

    11. Re:lvalue on the right by ubersoldat2k7 · · Score: 1

      I also like how Groovy handles getters and setters. Much nicer than Java IMHO.

    12. Re:lvalue on the right by gpuk · · Score: 1

      As an FYI, PHP also offers this.

    13. Re:lvalue on the right by heathen_01 · · Score: 1

      I find that annotations on properties (in java) make the code less readable. This is a problem already when using something like hibernate without adding more annotations.

      The @property syntax may be a little nicer, however I don't find the boiler plate code related to getters and setters in java to be a problem (any more). They exist at the bottom of the class so I never have to look at them and the IDE takes care of adding and removing them when necessary.

    14. Re:lvalue on the right by kaffiene · · Score: 1

      Yeah, right. x.myProperty is a MILLION times better than x.getMyProperty

      Do you seriously think this is that big an issue?

      Besides which, get/set are just idioms. If you want to define accessor/mutators in Java without the get/set prefix, you can:

      int myProperty(){ return mp; }
      void myProperty(int i){ mp = i; }

      But seriously - this seems like the most trivial thing to worry about.

    15. Re:lvalue on the right by DMiax · · Score: 1

      Or just use a language where assignments are not expressions. You lose in terms of obfuscation, so there is always a tradeoff. If you want your program to be unreadable a language with this property is definitely not going to help.

    16. Re:lvalue on the right by GooberToo · · Score: 1

      I am definitely not sad to not be a Java developer.

      Nor should you be.

      I program in C, C++, Python, and Java, to name a few. I can in fact assert that Java is as tedious as C++ and even occasionally more so. Because of Java's robust framework and runtime environment, you can frequently create a production product faster in Java than C++, but even that has largely changed as C++ has matured and its development model is now understood. But given the option, coding in Python and speeding things in C++ typically results in development which is twice as fast as Java and performance which falls somewhere between equal to an order of magnitude faster than Java.

      Basically, so long as Java isn't a company mandate, C++Python is superior to Java is every way. You get faster development plus faster performance plus the ease of debugging and run-time introspection which blows Java away.

    17. Re:lvalue on the right by m50d · · Score: 1

      It's not trivial when it means you end up with 100klines of junk methods. The point of making it x.myProperty is that you never need to add the methods until you need them to actually be methods - the nominal point of having x.getFoo() and x.setFoo() rather than just a public field x.foo is in case you want to add a cacher or logging or whatever later on, so people add them to every field "just in case", which is the worst kind of premature optimization.

      --
      I am trolling
    18. Re:lvalue on the right by jmorris42 · · Score: 1

      Uh... no. Assignment in a conditional and using the fact assignments return the value is a useful idiom. Sometimes it makes code clearer, sometimes it doesn't. Learn to use it for good.

      An example for a few days ago makes this pretty clear:

      while (my $circ = $circs->fetchrow_hashref) {

      It happens to be perl, but equally applicable to most C looking languages that use = and == for assign and equality. Any actual value assigned is TRUE and the loop continues.

      --
      Democrat delenda est
    19. Re:lvalue on the right by shutdown+-p+now · · Score: 1

      If I remember correctly, GCC uses a handy trick there. If you use an assignment expression directly in your conditional, like so:

      while (s = foo()) { ... }

      it's taken as a typo, and you will get a warning. If you actually mean just that, you can always parenthesize the expression, so it's no longer used directly:

      while ((s = foo())) { ... }

      The problem with =/== typos is very real, so something like the above is the unfortunate necessity. Depending on the complexity of codebase, a typo might not even be noticed for a long time.

    20. Re:lvalue on the right by nedlohs · · Score: 1

      Not using that I didn't even consider as being possible

    21. Re:lvalue on the right by kaffiene · · Score: 1

      you do know that no Java programmer actually writes accessor/mutators, right? You just write out your member fields and get the IDE to generate the rest.

    22. Re:lvalue on the right by Lokitoth · · Score: 1

      Since when can Java do method return overloading?

    23. Re:lvalue on the right by Lokitoth · · Score: 1

      +1. That is the single greatest switch in existence.

    24. Re:lvalue on the right by kaffiene · · Score: 1

      Since when can Java do method return overloading?

      Um.... It can't. Re-read the code I wrote - that's bog standard parametric overloading.

    25. Re:lvalue on the right by Daniel+Phillips · · Score: 1

      Because the bugs associated with mistakenly using = vs. ==, I always put the constant value being compared on the left.

      So you're the one. Can't say how much I hate reading code like that. Thankfully, that particular annoying affectation should be a thing of the past now that GCC warns when you do that.

      --
      Have you got your LWN subscription yet?
    26. Re:lvalue on the right by DocHoncho · · Score: 1

      They exist at the bottom of the class so I never have to look at them and the IDE takes care of adding and removing them when necessary

      Which is exactly the kind of thing that makes Python users chuckle at Java. The bloody thing is so designed that it practically requires a sophisticated development environment to hide the warts required by said design.

      That being said, the "Python way" is to have everything public, unless absolutely necessary, in which case you use name mangling (self.__foobar gets mangled to be object specific, making it much more difficult to access out side of the particular class). Properties are useful strictly for the cases in which you wish to have fine control of what happens when an attribute is accessed/set.

      I know a lot of seasoned Java/C++ static typing coders get disconcerted by such a cavalier handling of attribute/method access, but it works for Python with a little bit of discipline and foreknowledge. Not much difference than knowing better than to try to access some block of memory in C++ after having already freed it.

      --
      Celebrity worship is a poor substitute for Deity worship and costs more to boot.
    27. Re:lvalue on the right by DocHoncho · · Score: 1

      Except when a change in requirements requires a change in the semantics of how a particular attribute behaves. With the Ruby/Python property syntax you can create a property with the exact same name as the attribute, implementing the new semantics and ALL code relying on that attribute will continue to function with out change. The fact that writing foo.bar = "Baz" translates to foo.bar("Baz") is completely invisible to the user, as it should be. And don't even start on "Refactoring tools" as a solution to this problem. The necessity for "refactoring" when you simply need to change something so simple is merely an indication of design flaws in in the language itself.

      The Java method is to access public attributes strictly with the kludgey getter/setter functions. Although I've never worked on a "huge enterprisey project," the Ruby/Python method of public except where absolutely necessary is easiest to work with. If some stupid bastard is changing things in an object which shouldn't be changed from the outside, the problem is due to PERSONNEL, not design.

      --
      Celebrity worship is a poor substitute for Deity worship and costs more to boot.
    28. Re:lvalue on the right by kaffiene · · Score: 1

      ... diatribe snipped ...

      ...And don't even start on "Refactoring tools" as a solution to this problem. The necessity for "refactoring" when you simply need to change something so simple is merely an indication of design flaws in in the language itself.

      The Java method is to access public attributes strictly with the kludgey getter/setter functions. Although I've never worked on a "huge enterprisey project," the Ruby/Python method of public except where absolutely necessary is easiest to work with. If some stupid bastard is changing things in an object which shouldn't be changed from the outside, the problem is due to PERSONNEL, not design.

      Huh! That huge 'Refactoring Ruby' book I've got at work must be completely in error, then. You must drop them a line and let them know they've got it all wrong.

      You are so wrong-headed about refactoring that I can't even be bothered to correct you. Use Google to educate yourself about why software engineers refactor code. HINT: It's not related to language choice.

    29. Re:lvalue on the right by m50d · · Score: 1

      Code is read more often than it's written, you still have to read and understand those methods even though you don't have to write them. Most of the time you end up assuming that getFoo is a dumb accessor for foo and reading straight past it - which will then majorly trip you up the one time in 1000 someone's done something "clever" in the method. Where I work we tried using Lombok for a while as a way around this, but found it introduced compiler bugs.

      --
      I am trolling
    30. Re:lvalue on the right by Lokitoth · · Score: 1

      int myProperty(){ return mp; }
      void myProperty(int i){ mp = i; }

      What are you talking about? You have one returning an int and the other returning a void. That is why I asked. Guesing you meant to return an int in the second one as well, so not as excited as I was when I first saw it.

    31. Re:lvalue on the right by kaffiene · · Score: 1

      I agree with you that code is read more than it's written, which is why I think that being explicit in code is better than being clever. It's also why I don't think a few extra characters here or there make a big difference.

      I do agree with you that having lots of accessor / mutators makes the code harder to read, but I still don't think its the biggest problem in the world. Most people just browse their classes via an IDE anyway. This seems like one of the more trivial reasons to dislike Java. I'd much rather see closures, type inference, object literals, type inference in the language than agonise over accessor functions.

    32. Re:lvalue on the right by DocHoncho · · Score: 1

      I didn't mean to imply that I thought refactoring was in and of itself useless, rather that with the Java style getters/setters you either have to use those exclusively, just in case you need to change the semantics of accessing a particular property, or use refactoring tools to automate changing what had previously been a simple attribute access, e.g. blah == foo.bar, to blah = foo.getBar() when the situation dictates.

      I merely wished to point out the typical Java solution of "Getters and Setters For Everything" is wrong headed and leads to the exact kind of code bloat and extraneous verbosity that Java is undeniably famous for. The kind of pointless verbosity which requires complex IDE's and toolsets to keep developers from going insane. "Oh joy, my new class is going to have 20 publicly visible attributes, time to write 20 more getter methods. I love my job!"

      --
      Celebrity worship is a poor substitute for Deity worship and costs more to boot.
    33. Re:lvalue on the right by m50d · · Score: 1

      Hmm. On one level it is trivial, but it's an immediate thing that gets in the way all the time, and it encourages an excessively verbose style of programming that makes the language worse all round. I don't really miss object literals, and I think the lack of type inference is a deliberate decision; in fact, I'd say explicit typing is what makes java what it is. It could do with closures, but I can usually manage without them; the JSR166 parallel-array libraries let me express most of the map/reduce type logic I usually want to use closures for. I would appreciate more powerful generics (e.g. co- and contravariance), and fewer compiler bugs around the generics that exist, and better type composition (mixins or the like) would be a godsend. But all these are things that annoy me maybe once or twice a week, wheras the getter/setter functions are in my face all the time.

      --
      I am trolling
    34. Re:lvalue on the right by kaffiene · · Score: 1

      int myProperty(){ return mp; }

      void myProperty(int i){ mp = i; }

      What are you talking about? You have one returning an int and the other returning a void. That is why I asked. Guesing you meant to return an int in the second one as well, so not as excited as I was when I first saw it.

      No, I did NOT mean to return an int. That is perfectly valid Java code. You DID notice that one method takes an int and the other has no parameters, right? That's why this is just normal parametric overloading, as I said.

    35. Re:lvalue on the right by kaffiene · · Score: 1

      I didn't mean to imply that I thought refactoring was in and of itself useless, rather that with the Java style getters/setters you either have to use those exclusively, just in case you need to change the semantics of accessing a particular property, or use refactoring tools to automate changing what had previously been a simple attribute access, e.g. blah == foo.bar, to blah = foo.getBar() when the situation dictates.

      I merely wished to point out the typical Java solution of "Getters and Setters For Everything" is wrong headed and leads to the exact kind of code bloat and extraneous verbosity that Java is undeniably famous for. The kind of pointless verbosity which requires complex IDE's and toolsets to keep developers from going insane. "Oh joy, my new class is going to have 20 publicly visible attributes, time to write 20 more getter methods. I love my job!"

      As I said before, no-one writes all those getters and setters, so you're railing at a problem that no-one ever has. If there was some rule that you had to code using notepad, you'd have a point. But there isn't and the fact is that everyone codes Java using an IDE (you have to mainly for documentation and completion on the standard libraries since they're so numerous).

      In practice, writing a class in Java with 20 publicly visible attributes in Java is EXACTLY the same as doing so in Ruby. You can only make your strawman argument work if you insist that IDE's are not allowed. In the real world, people use IDEs. And so what if they're "complicated". They're not, but even if they were, so what? I use Emacs a whole lot - you can certainly argue that Emacs is complicated but that doesn't make C code bad because I use Emacs to write C in. I'd never write LISP without an editor that does parentheses matching - is LISP suddenly a bad language? I don't think so.

    36. Re:lvalue on the right by gmack · · Score: 1

      I wish there were more programmers like you and the other reply to my post in my office rather than ones I have to work with who actually edit C header filess to disable my vararg format specifiers in order to cut back on warnings.

    37. Re:lvalue on the right by DocHoncho · · Score: 1

      I'm not saying IDE's are not allowed, I'm saying they're NECESSARY due to the mounds of extraneous code necessary to handle even basic tasks.

      As for Emacs, I use it each and every day to write python. But it's not an IDE. Anyhow parentheses matching is a quite a different beast than needing a specialized tool simply to generate gobs of boilerplate code without spending more time writing boilerplate than actual application logic.

      --
      Celebrity worship is a poor substitute for Deity worship and costs more to boot.
    38. Re:lvalue on the right by kaffiene · · Score: 1

      I'd say that parenthesis matching is necessary for programming LISP, but whatever.

      Let's say that an IDE *is* necessary for programming Java (I'd agree it is) so what? Java & and IDE is how people code java - get over it. You think that's "impure" or "improper" in some way. So. Fucking. What. I don't share your sense of the moral significance of that fact. There is no software engineering benefit or hinderance flowing from that fact. You like languages that don't need IDEs, I like girls with red hair. Those facts have as much software engineering significance as each other.

  26. Grammar nazi here... by SanityInAnarchy · · Score: 1

    It is built to run on the JVM, uses static typing, and supports high while maintaining a strong focus on being easy learn and easy to read.

    Supports high what? Does it just support being high?

    --
    Don't thank God, thank a doctor!
    1. Re:Grammar nazi here... by talawahdotnet · · Score: 2

      Oops. That should have been "high-order functions". Corrected

    2. Re:Grammar nazi here... by Jonner · · Score: 1

      Ceylon supports high gear. You don't want to be stuck in first while trying to beat your competitors with the next WebWidget 3.0.

    3. Re:Grammar nazi here... by Jonner · · Score: 1

      Oops. That should have been "high-order functions". Corrected

      Actually, that's still not right. The correct term is "higher-order functions.

  27. Still stuck without rich types by msobkow · · Score: 2

    As long as it runs on the JVM, it's still stuck without support for unsigned data types. Not interested.

    --
    I do not fail; I succeed at finding out what does not work.
    1. Re:Still stuck without rich types by SplashMyBandit · · Score: 0

      Huh? I 've done a *lot* of bit-level manipulation for devices using Java and the lack of unsigned types has been far outweighed by the benefits of using Java (develop on desktop and deploy to embedded device where 'write once, run everywhere' works far better than C++ for the same tasks). In lieu of using unsigned types you simply use an integer type one 'step' larger and go from there. Once I changed my own mindset from the way I used to do things in C++ to the way Java does things I found the change liberating and I was vastly more productive too (plus, Java's productivity tools like NetBeans and the diagnostics of JVisualVM are hard to beat).

    2. Re:Still stuck without rich types by Anonymous Coward · · Score: 0

      Lack of unsigned types is a limitation of the Java language, not the JVM. There are ways to run C and C# on a JVM, both of which require unsigned types.

    3. Re:Still stuck without rich types by Anonymous Coward · · Score: 0

      LMAO, of all the reasons to pick a language...

    4. Re:Still stuck without rich types by Anonymous Coward · · Score: 0

      +100 agree.

      Who on earth comes up with a computer language without unsigned computational fields ?

      What were they thinking ?

      This is brain dead.

    5. Re:Still stuck without rich types by Jamu · · Score: 1

      Unless the JVM has been extended recently, then all of its primitive integer types are signed two's complement. When C is compiled into Java bytecode then its unsigned integers will be implemented using signed integer types for the JVM!

      --
      Who ordered that?
  28. Re:Another One! Just what we need by garyebickford · · Score: 3, Funny

    Don't forget all the other important languages!
    * brainfuck
    * whitespace
    * piet
    * INTERCAL
    * false
    * befunge
    * malbolge
    and, of course (last but not least!)
    * LOLCODE

    --
    It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
  29. Re:I like not equals assignment operators by MightyMartian · · Score: 0

    Fuck that. I want an OS written in PHP3. Why have the odd security hole, make an OS that's nothing but security holes!

    --
    The world's burning. Moped Jesus spotted on I50. Details at 11.
  30. Open source: magical brownie cobbler? by handy_vandal · · Score: 1

    Open source isn't like a magical brownie cobbler that fixes your shoes in the night if you leave him a little saucer of milk.

    Made me laugh! Thanks!

    --
    -kgj
  31. Re:Programming in Java Makes Me Want to Kill Mysel by balbeir · · Score: 1

    Ah, at least one voice of reason

  32. 11 days too late by Baldrson · · Score: 0

    April Fools was 11 days ago.

  33. SNOBOL by handy_vandal · · Score: 1

    Ahh, SNOBOL. I'm getting misty-eyed ... those were the days, my friend ....

    --
    -kgj
  34. Ceylon:Tea::Java:Coffee by rsborg · · Score: 1, Funny

    So I guess Redhat is going to be popular with some folks in the right-wing of US political spectrum?

    --
    Make sure everyone's vote counts: Verified Voting
    1. Re:Ceylon:Tea::Java:Coffee by Anonymous Coward · · Score: 0

      As a Brit, I find it hard to believe that anyone in the Tea Party movement has ever come into contact with actual tea. Tea is magical warming calming juice that makes all the world seem ok and all problems surmountable. Basically, tea is nice; no comment on the tea party people.

    2. Re:Ceylon:Tea::Java:Coffee by Anonymous Coward · · Score: 0

      As a Brit, I find it hard to believe that anyone in the Tea Party movement has ever come into contact with actual tea.

      You may have heard of the Boston Tea Party, which is their inspiration... you know, where their only "contact" with the tea was dumping it in the harbor?

    3. Re:Ceylon:Tea::Java:Coffee by Anonymous Coward · · Score: 0

      British Tea? Dump it in the harbor!! Tyrants.

    4. Re:Ceylon:Tea::Java:Coffee by Anonymous Coward · · Score: 0

      Obviously they should have boiled the water first before dumping the tea.

    5. Re:Ceylon:Tea::Java:Coffee by Anonymous Coward · · Score: 0

      The irony there is that the Boston Tea Party was about protesting a lower tax. The East India Company was dumping its product in the US and putting American tea importers out of business. The colonists responded by boycotting, which caused a glut of unsold tea. The crown then waived the usual import tariff for the colonies in order to facilitate massive dumping, and the Sons of Liberty responded with a little dumping of their own.

      Common among all the fliers and pamphlets going around denouncing the East India Company at the time was to point out the company's egregious abuses of the native populations. Granted, propaganda is propaganda and we didn't exactly cultivate a stellar record there either, but it's interesting to note in contrast to today's tea partiers, who can never think to lay claim to any animosity against any corporation of any stripe.

    6. Re:Ceylon:Tea::Java:Coffee by box4831 · · Score: 1

      So I guess Redhat is going to be popular with some folks in the right-wing of US political spectrum?

      RedHat introduces: The Tea-Party Compiler for Ceylon! It never compiles successfully, it will only complain that you have too much code and suggests you cut some functions out, even if they work.

      --
      Miller Lite tastes like water that's somehow managed to rot.
    7. Re:Ceylon:Tea::Java:Coffee by Tetsujin · · Score: 1

      As a Brit, I find it hard to believe that anyone in the Tea Party movement has ever come into contact with actual tea. Tea is magical warming calming juice that makes all the world seem ok and all problems surmountable. Basically, tea is nice; no comment on the tea party people.

      They only drink the sugary crap that passes for iced tea: "Lipton Brisk" and so on.

      Oh, and they also enjoy Tea Bagging.

      --
      Bow-ties are cool.
  35. Re:I like not equals assignment operators by mysidia · · Score: 1

    Fuck that. I want an OS written in PHP3. Why have the odd security hole, make an OS that's nothing but security holes!

    That's like trying to build the hull of a sea freighter out of cheesecloth.

  36. Yet Another "Java-Killer-That-Runs-On-Java"? by AtlantaSteve · · Score: 1

    I can name at least dozen "scripting" languages that run atop the Java Runtime Environment. About half of them have been around for nearly a decade. The most popular non-Java scripting languages (e.g. Ruby, Python) started creeping into the enterprise by way of their JRE implementations (e.g. JRuby, Jython). Nevertheless, apparently the ultimate "Java Killer" is going to be... yet ANOTHER language running atop the Java Runtime Environment! Developed by the company behind the JBoss, one of the top-5 Java application servers. And Seam, one of the top-5 Java application frameworks. Apparently, Java "dies" in the same manner as Dr. Who...

    I get it. I understand why these posts are so popular, and why Slashdot runs at least one per week. Compared to Ruby on Rails or whatever... Java is relatively verbose, and it's more cumbersome for newbies to write their first Hello World app. Of course when you're working on real-world enterprise projects, with large developer teams and significant codebases, then much of that cumbersome stuff makes life a lot easier. But many people online are closer to that Hello World end of the spectrum, so a language's "Hello World experience" drives message board mindshare. Plus, there is the evil-Oracle thing on top of that. So Java sucks. Java's dying. I get it.

    Except that it's not. At least not anytime soon, and not until you can show me a credible replacement that doesn't have "Runs On The JRE!" as its main selling point. I'm sure that something will come along eventually, but hell... in the realm of core business logic, Java only just surpassed "legacy" languages such as COBOL and C++ within the past few years! Moreover, the best contenders for "Next Big Thing" are JRE-based languages such as Scala, for which fundamental Java knowledge makes you more productive. Hell, even *off* the JRE, I would argue that being a top-class Ruby or Python developer requires as much computer science knowledge as with Java. Once you get beyond the Hello World stage, the idea that "scripting" languages are easier to learn is a fairy tale.

    All that being said... I'm poo-poo'ing the hyperbole in the title, and not the content itself. It's nice to see another strongly-typed language on the JRE besides Scala. From what I see in the slideshow, this Ceylon thing looks like a "me too!" version of Scala, which has an 8-year head start. However, the Seam framework from RedHat has always been a rather "me too!" competitor to Spring also. Even though I've worked more in the Spring camp, I've still benefited from Seam because it pushes Spring to stay ahead. Maybe Scala can benefit from this competition also.

    1. Re:Yet Another "Java-Killer-That-Runs-On-Java"? by Anonymous Coward · · Score: 0

      The only real heartache I have with java is the fact that I don't "enjoy" working with it as much as I do the scripting languages.

      I guess I have better things to do then deal with any of the following shit.

      1. ant build shit
      2. xml config shit
      3. 20 minute app startup shit
      4. compiler shit
      5. managers that love a language they do not have to use shit
      6. container shit
      7. insane memory usage shit
      8. curly brace shit
      9. wordy language shit
      10. framework shit

    2. Re:Yet Another "Java-Killer-That-Runs-On-Java"? by rjstanford · · Score: 1

      The only real heartache I have with java is the fact that I don't "enjoy" working with it as much as I do the scripting languages.

      I guess I have better things to do then deal with any of the following shit.

      Alright, I'll bite. Its actually an interesting list. We have a pretty decent real-world "100%-uptime-goal" application, a standalone common platform with internal and external API access, a few webapps, et cetera, so that's what I'll refer to here.

      1. ant build shit

      Nah. Never understood the fascination behind complicated project layout. Wrote a couple of basic ant scripts 4 years ago by hand, barely touched 'em since. Complicated builds are a sign of ... well, something. But they're absolutely not necessary for a complicated real project.

      2. xml config shit

      Likewise. Admittedly we use Seam-over-J2EE for most of our stuff, but beyond tagging classes with "Oh, this one should be Stateless" or objects with "Please provide me a standard representation of this at runtime from somewhere", its not a big deal. There are 3-4 lines of XML code per interesting webpage, but that's not much compared to the XML defining the webpage itself.

      3. 20 minute app startup shit

      Yeah, I'd hate that too. Luckily, JBoss and all the associated apps take about 22 seconds. Which still gets annoying.

      4. compiler shit

      Like type checking? Dead code warnings? Everything that gives us, we don't have to write tests for, which is fine by me.

      5. managers that love a language they do not have to use shit

      Er... whatever.

      6. container shit

      Not having to worry about some of the things that containers give you is great. I define my message bus implementation over here, use it over there... works perfectly. Now, some of the container implementations (including the one we use) are far from great at certain things, but they bring a lot to the table when you're working on a 20+ server application too.

      7. insane memory usage shit

      Agreed here, although this is far less of a big deal than it used to be (the relatively fixed overhead is dwarfed over time by the scalability of the application). Its far more apparent on dev machines than production servers, and not very meaningful on those.

      8. curly brace shit

      I like curly braces, actually. Its one less thing I have to guess, one less thing that can be copy/pasted incorrectly, and it helps the compiler to help me know when I've likely done something incorrectly instead of just doing it wrong.

      9. wordy language shit

      One of my favorite Java features, actually. No, seriously. When I read Java code - even a few lines of sample code exercising a library written by someone else 4 years ago halfway around the world - I know what its doing. I may not understand the library calls, but I have no doubt whatsoever about the language.

      This isn't a feature thats useful for small projects. Its wonderful when dealing with software written over 5-10 years by a variety of people who may or may not still work with you.

      10. framework shit

      Again, useless on small projects, pretty durn good on larger ones where you're working on software that can handle hundreds or thousands of parallel, complicated requests all performing complex business tasks. And no, I haven't found a Java web framework that I really like yet, but I could say that about all the frameworks I've tried, regardless of the language.

      Modern Java's not bad when its used to solve problems its good at solving. The same is true for many languages - I'd never write a Windows GUI in Java, for example, nor would I reach for C# to do my next clustered platform. You can do a good job in both ... but its a lot harder than it needs to be.

      --
      You're special forces then? That's great! I just love your olympics!
    3. Re:Yet Another "Java-Killer-That-Runs-On-Java"? by AtlantaSteve · · Score: 1

      Nothing personal, but this is exactly what I was talking about in terms of "Hello World" mindshare.

      High memory usage (7) and slow startup times (3) are legitimate complaints about large-scale Java applications. However, compilers (4), build scripts (1), and some sort of container system (6) are simply par for the course in any large-scale enterprise environment. To make the Gee-Wiz-Webby-2.0-Hello-World stuff scale to industrial-strength levels... companies have to either break off the most intensive operations to be handled by a JRE (e.g. Twitter), or write their own traditional compiler for the language (e.g. Facebook).

      Config files are a hassle (2), but frameworks like Spring and Hibernate have been moving toward annotations and config-by-convention for years. No matter how you slice it, if you're using dependency-injection or any sort of modern design practices, then that wiring information has to be maintained SOMEWHERE. If you're not used to maintaining that information, then that just says you haven't worked on any large-scale applications. Speaking of which, frameworks (10) are bad?!? Even the Hello World stuff is all based on frameworks, e.g. Rails for Ruby, Symfony or Cake for PHP, Django for Python, Grails for Groovy, etc. People stopped throwing their homegrown Perl scripts into "/cgi-bin" back in 1997!

      I don't know what to say about "wordy" (9) or "curly brace" (8) complaints. That stuff is subjective... these traits were simply adopted from C, the primary language for doing real work prior to Java becoming the primary language for real work. However, the final item (5) is by far the dumbest on this list. I don't mind a manager who "loves a language they don't have to use". I hate managers who see the shiny graphics on the Ruby or Rails websites, spend 15-minutes walking through the hello world Rails tutorial, and then start pushing it because they magically feel like a programmer too! All things considered, "disrespecting your job" is a hell of a lot better than "thinking they could do your job".

  37. Is not the language by Anonymous Coward · · Score: 0

    The reasons of why Java is a popular language (at least in business applications), have nothing to do with the "language", but are more related with the platform:
    - Lots of mature open source frameworks for almost anything
    - Lots of multiplatform IDEs and tools
    - Open and closed source tools to support the usual business requirements over multiple platforms
    - A VM with good support for native multithreading, good runtime optimization (JIT compilation, PIC), different garbage collector strategies, monitoring and debugging interfaces

    In programming language terms there are a lot of better OO languages out there: Smalltalk, Scala, Ruby, Groovy... even C# is better.

    If you want to make the next mainstream programming language it's simple: take the main browser developers (MS, Mozilla, Apple, Google) and make them to agree in a new language without some of the limitations of JavaScript

    1. Re:Is not the language by Anonymous Coward · · Score: 0

      Java is popular because it dumbed down programming. So, now any idiot can think he has 'leet skillz. Java programmers are the script kiddies of the software development world.

  38. "Such a format will close the door." by Anonymous Coward · · Score: 0

    "Two protons expelled at each coupling site creates the mode of force, the embryo becomes a fish that we don't enter until a plate, we're here to experience evolve the little toe, atrophy, don't ask me how I'll be dead in a thousand light years, thank you, thank you. Genesis turns to its source, reduction occurs stepwise though the essence is all one. End of line. FTL system check, diagnostic functions within parameters repeats the harlequin the agony exquisite, the colors run the path of ashes, neuronal network run fifty-two percent of heat exchanger cross-collateralized with hyper-dimensional matrix, upper senses, repair ordered relay to zero zero zero zero."

  39. PHP by Anonymous Coward · · Score: 0

    You can do this in PHP with what they strangely call "overloading" , but I imagine that is not quite what you want ;)

  40. Re:I like not equals assignment operators by shutdown+-p+now · · Score: 1

    It's the only logical outcome of assignment being a value-returning operator. Of course, in C it is further compounded by the fact that all primitive types are permissible in boolean context.

  41. Re:Programming in Java Makes Me Want to Kill Mysel by shutdown+-p+now · · Score: 1

    If you have programmed in C++ (and I mean C++, and not "C where you can write // comments and 'class' instead of 'struct'"!), then Java seems anything but slick. In fact, it seems more lobotomized than anything.

  42. The trouble with the Java killers by mysidia · · Score: 1

    <Raymond> Red Hat Ceylon uncloacking, 50 kilometers off the starboard bow.
    <Raymond> They are charging forward disruptors.
    <Henley> Shields up, red alert
    <Raymond> Capitan, they are firing forward NoSQL disruptors.
    <Ellison> Evasive manueuvers, stand by InnoLasers queries, return fire.
    <Ellison> Open fire.
    <Raymond> Our torpedos hit them.
    <Raymond> The Ceylon's forward shields are down.
    <Ellison> Prepare to deploy takeover field.
    <Raymond> Capitan, they have just launched 5 Java killers at us.
    <Ellison> Oh crap.
    <Ellison> Launch OEL torpedos and deploy the distribution cloning apparatus.
    <Raymond> Torpedos away.
    <Raymond> Heavy damage, captain, having trouble reassembling the shields.
    <Ellison> Hit them with the secret weapon.
    <Raymond> The distribution cloning apparatus?
    <Ellison> No. The patent and copyright lawyers.
    <Raymond> Captain, don't you think that's a bit cruel?
    <Ellison> Do it now.
    <Raymond> Yessir
    <Raymond> Red Hat destroyed, sir.... but...
    <Raymond> But?
    <Raymond> Fedora Ceylon just uncloaked, they've launched millions of Mono-based Java killers
    <Raymond> Evasive?
    <Raymond> We are completely surrounded, cannot move an inch

  43. Re:I like not equals assignment operators by Alex+Belits · · Score: 2

    Considering how all programming languages that use := are hated with a passion, I would say that a swastika would make a better assignment operator by now.

    --
    Contrary to the popular belief, there indeed is no God.
  44. Gratuitous differences by Compaqt · · Score: 2

    Why is that language designers feel they must come up with gratuitous differences to differentiate their babies?

    I'm talking about where keywords are used in the same (or much the same) way, but they've come up with something different after spending some time with a thesaurus:

    E.g., instead of Java "implements" for interfaces, you get "satisfies".

    abstract is replaced by "formal"

    "actual" means "override"?

    "public" -> "shared" : what's the value-add?

    "var" -> "local" : var types much easier.

    --
    I'm not a lawyer, but I play one on the Internet. Blog
    1. Re:Gratuitous differences by GodfatherofSoul · · Score: 1

      The rationale is just like you see in every fork of every software product or library: someone thinks they're making it slightly better. While pros know what these terms mean, some guy out there thinks that the terminology is a little ambiguous. Or, some new usage makes an old term a little incorrect. If you're pedantic and especially if you're coming from the higher ends of academia, that's grounds for a renaming.

      It's a fine line and I can see both sides. There are plenty of terms I've come across that have been slightly wrong or obsoletely named. At the same time, it's annoying to transition between languages and libraries and encounter different syntax for the same features. I've had to make the same decisions and usually it's a subtle judgment call which way to go.

      --
      I swear to God...I swear to God! That is NOT how you treat your human!
    2. Re:Gratuitous differences by Compaqt · · Score: 1

      Yeah, C# did the same thing too. E.g., super -> base.

      As far as I'm concerned, if you're making a new language, just keep the old C/C# syntax, and try to reuse as many keywords as possible.

      --
      I'm not a lawyer, but I play one on the Internet. Blog
    3. Re:Gratuitous differences by Anonymous Coward · · Score: 0

      const -> final

  45. Unleash the recruiters by codepunk · · Score: 2

    Great, I expect a email from a recruiter tomorrow wanting someone with 10 years of production Ceylon experience.

    --


    Got Code?
    1. Re:Unleash the recruiters by dragonquest · · Score: 1

      And the recruiter will get hundreds of replies starting with "I've been picking tea leaves since 2001 in Sri Lanka, thus fulfilling your criterion of production Ceylon experience.."

      --
      "Never try to tell everything you know. It may take too short a time."
  46. Yay! by Anonymous Coward · · Score: 0

    What computing needs is another language! Preferably an object-oriented, VM-executed, wordy one that has "Enterprise" written all over it.

  47. You lost me at JVM... by Anonymous Coward · · Score: 0

    In my view the problem with java is its JVM and the great reluctance to improve it.

  48. Re:Another One! Just what we need by inglorion_on_the_net · · Score: 1

    We need another "language" like we need a hole in our collective heads.

    In a way, yeah. In that regard, the good news is that most people will never use most of these languages.

    However, what I see happening is a desperate effort to improve the state of the world. The good thing about Java is that it broke open the field of programming languages. If we can get industry to switch to Java, we should be able to switch it to better languages, too. So now groups from around the world are trying to make that happen.

    --
    Please correct me if I got my facts wrong.
  49. I for one.... by Anonymous Coward · · Score: 0

    I for one welcome our new operator overloads .... sorry couldn't resist

  50. Re:Programming in Java Makes Me Want to Kill Mysel by calmofthestorm · · Score: 1

    I use Python for everything. But I'd take C++ over Java any day. Don't even list it on my resume.

    --
    93rd rule of Slashdot: No matter how obvious my sarcasm is, my comment will be taken seriously by someone.
  51. Need Ben Alex by Anonymous Coward · · Score: 0

    Am I the only one who read, "Cylon"?

    Do they have a plan?

    It's Gavin King. The plan is to create fundamentally sound (if occassionally limited) but obscure and difficult to understand frameworks then sell training to big corp, government etc.

    To succeed, they really need to involve Ben Alex as well.

    Speaking of which.....Ben Alex and Gavin King walk into a bar....

    FIGHT! FIGHT! FIGHT! FIGHT! FIGHT! FIGHT!

  52. Re:Another One! Just what we need by Anonymous Coward · · Score: 0

    How about

      Coral
      Algol

      PDP-11 Assembler {ok, I have an 11/73 in my Garage running RT-11}

  53. not another one.. by SuperDre · · Score: 0

    I'm sorry, even if it's the best language ever, we don't need another one.. This is the problem these days, everyone thinks he/she has created the best language ever and everyoneelse should use it.. Enterprises really don't want to jump onboard the latest fab and an unproven language..

  54. Yes, but...probably no by bradley13 · · Score: 3, Interesting

    Java needs to be replaced. I have taught Java for years, because many colleges think it is a good first language to learn. Only recently have I actually attempted to develop commercial quality applications in it. Frankly, Java sucks big green ones. Generic types (with type-erasure) are a total hack, denying the running code valuable information. Abstract classes are only half-implemented, since you cannot have abstract static methods (e.g., factory methods). Meta-programming in Java is extremely limited - Reflection covers a few aspects, but even these are very awkward to use. Exception handling is awkward, there is no multiple inheritance, not all types are objects - hacked with boxing and unboxing. And so on, and so forth, and so on...

    The chances of this language going anywhere are small. Anyone who has enjoyed studying compilers has written (or at least imagined) their own language. Creating new languages is fun, lots of people do it, and mostly - even if they are good - the languages disappear down a deep, dark hole. Success for a language requires a lot of support from many different parts of the IT community: lots of libraries, job prospects, more libraries, books, courses, real world applications, and did I mention code libraries? There are zillions of languages out there, many of them better than Java. Unfortunately, none of them to date have gotten the necessary support. What are the chances that this language will be different?

    --
    Enjoy life! This is not a dress rehearsal.
    1. Re:Yes, but...probably no by kaffiene · · Score: 1

      If you cant successfully make commercial quality applications in Java, I'd suggest there's a problem with you rather than Java. One or two other people have managed to do alright with Java so far.

    2. Re:Yes, but...probably no by PJ6 · · Score: 1

      I've heard a lot of arguments against static abstract methods, mainly gotchas that would supposedly make such a feature more trouble than it was worth. I'd be very interested to hear you elaborate on some use-cases for us.

    3. Re:Yes, but...probably no by m50d · · Score: 1
      I can make commercial quality applications in Java, or C++, or plain C, or x86 assembler. Or I can make them in a better language (python springs to mind, but really any of the modern dynamic/functional languages would do), faster and better.

      Sure, a good programmer can write good stuff in anything, but that doesn't mean some languages aren't better than others.

      --
      I am trolling
    4. Re:Yes, but...probably no by GodfatherofSoul · · Score: 2

      You keep slapping on new features every time someone has a slight issue with the language and you end up with C++. Don't know what you think is awkward about Java exceptions and multiple inheritance was yanked from the spec for very sound reasons (ask a gray-haired C++ coder why). Java makes compromises (like primitives not being first class objects), but at least they were done with forethought.

      --
      I swear to God...I swear to God! That is NOT how you treat your human!
    5. Re:Yes, but...probably no by TemporalBeing · · Score: 1

      Here's on from a layering I recently did.

      I have a class that acts as a wrapper to all my network communications. Inside it, I have a small protocol - header information for everything sent; and a couple specialized messages for flow control on a per connection basis. I also have a number of specific data-type connections derived from that class. All these need to use that same protocol and header information per the system architecture. There are a series of functions that have no bearing on the specific class instances that are implemented in the main class that do things like network ordering of the structures, or converting certain kind of information. These functions are all static functions; all used by the derived classes, and are effectively part of the "Interface" being provided. This makes for a very nice, clean, and consistent set of interfaces - and makes it rather easy to add new ones too; and I don't need 5 layers to do it - 1 layer defines the interface.

      So, OP is saying that these functions would now have to be non-static unless I went through quite a bit of trouble to hack my way around it and make them static.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    6. Re:Yes, but...probably no by PJ6 · · Score: 1

      For this case a static constraint on method implementation would give you a way of saying "this must be statically implemented", but it wouldn't make any functional difference - you could just call a static method from the implemented one. Right?

    7. Re:Yes, but...probably no by glwtta · · Score: 1

      not all types are objects - hacked with boxing and unboxing

      I could never understand why the "everything is an object" thing is considered something to strive for - can someone enlighten me?

      I find primitives extremely useful - if I have an array of, say, 500 million integers, that I need to serialize between invocations, it's very helpful to know what's going on - byte-for-byte - both on disk and in memory. It doesn't matter how clever your compiler is, if it's doing extra work, there will always be overhead (and I don't just mean performance/space - conceptually, primitives are easier to work with).

      If you don't like primitives you can always use the wrapper classes exclusively and pretend primitives don't exist. Autoboxing works well enough that you don't have to worry about interfaces that use primitive types - what's the big deal?

      To me, one of the biggest strengths of Java is the sweet-spot of abstraction that makes it useful for a wide range of applications; it seems a lot of these "improvements" want to push it towards higher abstraction at the expense of the other end of the spectrum.

      --
      sic transit gloria mundi
    8. Re:Yes, but...probably no by TemporalBeing · · Score: 1
      The point is primarily that it has to be part of the Interface class, available to all derived classes. While in this case, yes you are right there are likely very similar cases - e.g. such as where some a data structure is derived - where it may need to specify such.

      For example, the interface class defines the functions void interface::toNetworkByteOrder(dataInterface& _data) and void interface::fromNetworkByteOrder(dataInterface& _data) as static. The derived classes must implement them with a static constraint. Note that the actual interformation is passed by reference; and may not necessarily be the class itself. In my prior example, I pass structures for various messages types that are not part of the class itself - though a class function does call the function the data is not stored as part of the class as its a parameter to the calling function.

      Example:

      void networkInterface::sendMessage(int _messageType, QByteArray& data) // SLOT
      {
      struct messageHeader header;
      header.messageType = _messageType;
      networkInterface::toNetworkByteOrder(&header);
      ...
      }

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    9. Re:Yes, but...probably no by kaffiene · · Score: 1

      Python's great if performance is irrelevant and you can force everyone you code with to use the same editor so your significant white space isn't fucked up in a way that's invisible to you. But other than that, yeah, Python is great.

      You listed some pain points with Java - most of which I actually agree with. But saying that these are serious issues in creating commercial quality application is laughable. I'd rate Python's white space issue as a much bigger issue than any of those Java foibles you raised.

    10. Re:Yes, but...probably no by SJS · · Score: 2

      Many of the "improvements" to Java were done without the thought necessary to make them work right, such as the Generics capability.

      However, I disagree about the problem of abstract static methods. I have come to dislike static methods and would prefer to see their use limited *further*, since much of the absolutely terrible code I've had to deal with over the years has been a result of the (ab)use of static methods.

      Many colleges teach Java as a good first language, as the perceived alternative is C++, which is a terrible first language for anyone. Java's not a good first language, but it's by no means the worst.

      Java Generics are indeed a total hack, which is a result of trying to cram features into a language without thinking through the consequences. Generics were the cool thing, therefore, to remain relevant, Java must have Generics... and thus we get this festering sore on the language.

      I do not agree with the analysis for abstract static methods. In the Java object model, the concept makes no sense (unlike, say, Smalltalk), and, indeed, is arguably worse than useless. A great deal of the terrible code that I've run across over the years has been a direct result of programmers favoring static methods with only the shakiest of justifications.

      It's true that meta-programming is awkward, but in the languages where it isn't, and is heavily used, I fail to see a significant improvement in code readability or maintainability. It allows for clever techniques that can be extremely difficult to debug, much less understand from reading the source code. Awkwardness in this domain is a disincentive, which is arguably a good thing.

      Exception handling is awkward... and arguably more informative than in any other language in common use. Some languages allow the exception handler to "fix" the problem and resume, which is amazing and powerful and wonderful... until you discover a programmer who uses this capability for mixins and flow control, making the code virtually impossible to follow.

      But then, I'm one of those throwbacks who consider having to use a debugger to develop or read code to be a bad thing. Code is a form of literature, not a performance art.

      Multiple inheritance is an abomination.

      Not all types being object is a wart, and not a significant one. Autoboxing is a hack that's worse than the flaw it attempts to hide.

      Java is a language full of flaws, but when one tries to envision a replacement language, one needs to consider not its flaws, but what it did *right*, and /why/ that design decision was right for the language. (I assert that what's "right" may be different in the context of a different language; "these are my favorite things" is a poor way to assert what's right.)

      In my opinion, some of the things Java did that was right was:

      1) It ran on several platforms. MSWindows was the dominant desktop environment, and it sucked, and sucked hard. The more useful systems (Solaris and Linux at first) were far nicer for developers, but those systems weren't what the users and managers were using. Java could be developed on the hippie's Linux box, tested on the corporate Solaris server, and demonstrated to the manager on his MSWindows desktop.

      That's a huge win. Nobody feels that the language chosen is being used to force someone else's environment on everyone else.

      2) It supported concurrent programming out of the box. Most of the time, in most of the code, there's not a need to handle threaded or concurrent code. But in that window where it is useful to separate tasks into concurrent threads of execution -- such as keeping the database-access code out of the GUI drawing thread -- it's made vastly simpler in Java.

      And given that MSWindows at the time had a laughable concurrency model, Java's ability to bring this sort of concurrency to Java was *very* attractive. You didn't have to rewrite the algorithms developed on a UNIX-type machine to handle the broken MSWindows environment, which ties into

      --
      Pick One: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html (Note - disable Javascript first!)
    11. Re:Yes, but...probably no by maraist · · Score: 1

      "I have taught Java for years, because many colleges think it is a good first language to learn. Only recently have I actually attempted to develop commercial quality applications in it. Frankly, Java sucks big green ones."

      Opinion - as I would say the same for Ruby/php/perl. And I lothe non-portable languages. Java is really the best of what's available in my h. opinion.

      "Generic types (with type-erasure) are a total hack"
      -agreed, but it solved a particular annoying problem of having maps of maps of maps and having no clue what the hell's inside. Generics gives good coding feedback - reduces errors.. Performance wise it is worse than not having them though.

      ", denying the running code valuable information."
      -incorrect. So long as you extend a class with a generic, you can query the generic's concrete type.. It's cludgy, and best delegated to discovery utility classes, but very very vaulable in producing dynamic code (such as for database abstraction layers).

      " Abstract classes are only half-implemented, since you cannot have abstract static methods (e.g., factory methods)."
      -incorrect. Only interfaces prevent static methods. But even then, you can declare inner classes in interfaces that have static methods so you at least have namespace encapsulation. Though honestly I don't see the value of abstract classes.. Whenever I've seen one, I've found a need for it to have instead been a pure interface. It's really just laziness on the coder's part in my opinion (delgation to utility classes it trivial with modern editors - and is FAR cleaner/easier to read then spaghetti inheritance).

      " Meta-programming in Java is extremely limited - Reflection covers a few aspects, but even these are very awkward to use."
      -could you elaborate? The reflective aspects of Java exceed that of any language I'm aware of. Now the dynamic CODING is limited.. You can't change class hierarchies on the fly like you can w/ Perl, etc. You have to compile new code (e.g. with a byte-code enhancement), which has long term performance/bloat implications. And of course it's staticly typed for most operations (unless you just use java.lang.Object for everything - which isn't anywhere near as convenient as in lossely typed languages like perl/etc).

      " Exception handling is awkward"

      I've never found an Exception handling system I really liked. But I still love exceptions. And if you use a J2EE or spring environment, excepts 'do the right thing' in java moreso than in most languages I've seen.. Try throwing a random exception in a complex javascript app - see if your program continues proper execution. Perl is more than happy to default by aborting (and most CPAN libraries except as much). In contrast, in most java frameworks, you have a thread-safe, state-independent workflow with thread-locals storing transaction caches, etc.. They all have nice registered undo operations.. So at the J2EE EJB/servlet/JMS or pretty much any spring widget exception outer-most loop.. Cleanup is almost always assured.. Of course, this assumes you follow the recommended conventions - meaning don't EVER use global variables that aren't designed for concurrency and transaction awareness. Hell, just don't use global variables. The solution that spring provides is to say Sun got it wrong, and you should NEVER use checked exceptions - I get a lot of flack, so I'll understand if you don't see the light either. That if you're unfortunate enough to encounter a method with checked exceptions, catch it and re-wrap it with an appropriate category of Runtime Exceptions.

      ", there is no multiple inheritance"

      -opinion - C++ M.I. is wrong wrong wrong. private inheritance is fine - essentially templating code. But multiple public virtual inheritance seemed wrong to me even when I was in CIS 101. And many books formally discourage it's use. But again, modern editors are such that delegation can solve many if not all of the value-add of multiple concrete inheritance.. In almost every instance, interfaces

      --
      -Michael
    12. Re:Yes, but...probably no by SJS · · Score: 1

      You're passing in a "type" flag in an object-oriented language and you consider that to be a "clean" design? Your aesthetic is *vastly* different from mine.

      When I'm programming in an OO language, I strive to eliminate type flags (you have a means of type-selection -- the object system. use it!), switches, or nested conditionals.

      I guess that's why there's so much noise and fury about desirable or undesirable features in languages -- some of the idioms used by one group are anti-patterns to another group, and, arguably, vice-versa. Presumably, the goals of OO are different as well -- is it to be used primarily to organize the code for clarity and maintainability, or is it to be used to maximize code reuse?

      --
      Pick One: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html (Note - disable Javascript first!)
    13. Re:Yes, but...probably no by TemporalBeing · · Score: 1

      I guess that's why there's so much noise and fury about desirable or undesirable features in languages -- some of the idioms used by one group are anti-patterns to another group, and, arguably, vice-versa. Presumably, the goals of OO are different as well -- is it to be used primarily to organize the code for clarity and maintainability, or is it to be used to maximize code reuse?

      That's a huge issue with all language designs, and you can't please everybody.

      But that's also the strength in C++ - it's flexibility, one reason it won't ever really go away, same with C. Both meet the needs of their users and their targeted environments in exceptional manners that no other language matches. Nothing else is as flexible to do different styles as most languages typically enforce a design style on their programmers.

      As to your question, I'd probably argue both. Code needs to be maintainable, and easily read. Any one programmer is never going to be the sole programmer of a project - especially in a proprietary software organization; someone is going to have to pick it up at some point. Arguably the best approach to clarity and maintainability also maximizes code-reuse.

      So for example, what I showed above while it may pass a "type" flag, that's perfectly okay. It maximizes code reuse by centralizing a function on a structure (a non-OO structure) and results in code that is both clear and maintainable. Now there is probably an OO-purest view that the structure should itself be wrapped in an OO-centric object and you only interact with that object; however, that leads to unnecessary overhead that results in (however slight) performance degradation.

      Obviously I'm not an OO-purest - while I do a lot of C++, I probably use a lot more C. C++ just makes things easier to manage - especially function association, and variable scoping. And of course, no matter how much of an OO-purest you may be at some point you have to leave the OO world in order to do things like put data on the wire; it's just a matter of how many layers do you put in between - arguably the fewer the better per performance.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    14. Re:Yes, but...probably no by Anonymous Coward · · Score: 0

      I have taught Java for years, because many colleges think it is a good first language to learn. Only recently have I actually attempted to develop commercial quality applications in it.

      You've been teaching it for years without having developed real applications in it?
      And we wonder why students are so bad at doing serious development...

  55. Re:Hmm ... nigger by greenfruitsalad · · Score: 0

    most of these are just generic my-tribe-is-superior-to-yours insults... and are usually only used by people whose only life achievement is some kind of connection to the tribe making the insults. i wonder how may of them were originally intended for the group you aimed them at.

  56. Another samey language by Spewns · · Score: 1

    Oh look, another language that's practically identical to 99% of other languages in syntax, features, etc.

    What an innovation! Time and money well spent by the folks that developed it.

    (See: masturbation. "Look, we can recreate C++/Vala/Java/C#/etc. too! Just like everyone else has!" And this is why programming sucks. Only fringe academic groups are trying to take programming languages anywhere interesting.)

  57. Aspect Oriented Programming by sourcerror · · Score: 1

    What about Aspect Oriented Programming? It seems like an attempt to resurrect multiple inheritance.

  58. Why? by kaffiene · · Score: 1

    Ummmm... WHY?

    If I want a 'better' Java, I'll use Scala. Problem solved.

  59. Project site? Alpha or Beta Releases? by dkh2 · · Score: 1

    OK, so I'm intrigued but, nowhere in this series of tubes we call the Internets can I find a reference to a project web site or anything about where to find early adopter tools.

    As Dr. Evil said... "Throw me a frickin' bone here!"

    --
    My office has been taken over by iPod people.
  60. Re:I like not equals assignment operators by doti · · Score: 1

    CFLAGS += -Wall -Werror

    problem solved

    --
    factor 966971: 966971
  61. Re:Hmm ... nigger by Anonymous Coward · · Score: 0

    most of these are just generic my-tribe-is-superior-to-yours insults... and are usually only used by people whose only life achievement is some kind of connection to the tribe making the insults. i wonder how may of them were originally intended for the group you aimed them at.

    Why do niggers always have tinted windows? They don't it's the black rubbing off.

  62. C++ by Anonymous Coward · · Score: 0

    Yes, it's called C++, you clod!

    Proper use of 'const' can ensure arrays are read only.

    If you *really* want copy-on-write semantics, it could be done by overriding the assignment operator of your array (and/or maybe that of the array element data type).

    One problem with copy-on-write is one has to worry about freeing/not-freeing the memory later. (could use reference counting). Another problem is that intentionally doing an in-place write will become difficult...

    For scientific programming, you probably better off explicitly managing arrays yourself and not relying on dynamic memory allocation, etc. It will be easier to maintain/reuse algorithms and it will run faster.

    1. Re:C++ by Anonymous Coward · · Score: 0

      You can't override the assignment operator for arrays. For one, arrays aren't first-class object and don't have operators (mainly because arrays decay to pointers in function calls). Secondly, even if they did, you can't override operators for built-in types. Thirdly, copy-on-write can be (and IS) handled very easily without the user having to worry about reference counting or dynamic allocation. Lastly, saying it will "run faster" is specious at best without actually benchmarking it. It is going to depend a lot on what the algorithm is. What you are arguing for is call premature optimization and THAT is what is bad for maintenance/reuse.

    2. Re:C++ by Anonymous Coward · · Score: 0

      "const" does NOT ensure that the array is read only. It ensures that the declaration through which you are accessing the array is read only. The array itself may very well be modifiable.

  63. What does it take to overcome ubiquity? by erroneus · · Score: 1

    In recent history, we have seen the automobile and Windows "take over." There are many other "better things" out there but nothing seems to be compelling enough to make changes. "Better" by itself is not good enough.

    Java, is what it is and there are also lots of better things. But Java is pretty well entrenched in the areas it is strong. So what can displace it?

    Better by itself is not enough. It has to be better, of course, but it also has to fill a need that the contender is unable to meet. And this need has to be really important to the users or to manufacturers/suppliers before change can take place. And of course, if there is a "work around" or some sort of adaptive middleware, that could also prolong the life of the contender long enough that "something better" will never take off.

    Changing and retooling is annoying to the point that people don't even want to consider it if they don't have to.

    This is [partly] why we still have gasoline burning cars instead of more efficient systems. This is why Windows is still ruling the desktop instead of using more client-server technologies which could make Windows irrelevant. And this is why the words "Java Killer" don't strike me as likely to be a claim that can come true.

    But back to Windows... we have all been watching the markets change in directions that Windows cannot go; netbooks, tablets and phones. Without anyone having to state the obvious, this is exactly the sort of thing that can bring an end to Microsoft Windows dominance. Making something "better" isn't enough. But when needs change while the usual tools are unable to adapt, then you have a problem waiting for another solution to come into play.

  64. yeah! by islon · · Score: 1

    OMG the java killer finally!! Wait...

  65. Gavin King is bad for the community by Anonymous Coward · · Score: 0

    Gavin King has a holier than thou complex. He closed 95% of bugs filed against Hibernate as "invalid" because he couldn't entertain the possibility of his code containing bugs. Most of them were legitimate problems that plague the system to this day.

    I wouldn't use anything written by Gavin even if it was the greater thing since sliced bread.

  66. Re:Programming in Java Makes Me Want to Kill Mysel by Anonymous Coward · · Score: 0

    Hey, genius, the "//" style comments have been part of the C Standard since '99.

  67. come on man by Anonymous Coward · · Score: 0

    You can return Collections.unmodifiableXXX for whatever Collections data structure you're using, or...WAIT FOR IT...CopyOnWriteArrayList. Do you even know how to use the JDK JavaDocs?

  68. and..wait until they have a large user base too by Anonymous Coward · · Score: 0

    and can't just up & change on a whim because some questionable developers think they can save a trivial percent creating their crap faster - wakeup! for the enterpirse you want it to work, and most of the effort is in design, not build (unless devs are seriously slow - and they can do that very well in any language...)
    Perhaps this will be nice and easy, but bloated & as easy to end up in a hole for crap developers just like hibernate - yay!

    Get some (a) enterprise class support - multi OS/architecture, and (b) quantative business case for it then maybe, but closures or some such isn't really going to save me a whole lot on most business apps.

  69. Re:Another One! Just what we need by Virtucon · · Score: 1

    You sound like it's 1996? There have been many before Java..

    Pascal was the rage in the 80s... Who uses that now? Okay, then there was Delphi (Pascal based) but that was probably the largest commercial distribution of it. Does anybody really use Pascal anymore?

    Ada is still in use, Federal Government mostly and that is a huge time waster.

    PL1? Anybody remember that? RPG is still around in whatever variant it's at. COBOL is definitely still around.
    LISP. Oh and let's not forget the most cryptic piece of crap to ever traverse a keyboard... APL.. I took one course in that back in the early 80s and hated every minute of it. The hell it brought just in learning the damn keyboard symbols. I still would like to string whoever came up with that pile of crap by their short hairs from the nearest tree!

    There was PL6 which ran on Honeywell DPS Mainframes (which begat the Xerox Sigma Series CP5)

    It goes on and on. The IT Highway is littered with the corpses of dead languages. It always seems that somebody has a bright idea about how they can improve upon the programming paradigm, commercial success is another thing. It's great to have "research" languages to be sure, something that pushes the boundaries certainly can be afforded but not some "Hey we have a XYZ killer here." It's such a conceded thought and it definitely shows that whoever is making that statement doesn't have a clue.

    --
    Harrison's Postulate - "For every action there is an equal and opposite criticism"
  70. coffee caffeine tea caffeine by Dr.Dubious+DDQ · · Score: 1
    "I thought tea had more caffeine in it than coffee?"

    Unless you mean decaffeinated coffee, no. A typical cup of coffee should have around 100mg of caffeine in it. Black tea has (as I recall) around 50-60mg normally, and green tea a mere 15mg or so.

    This isn't to say that you can't MAKE a cup of black tea with more caffeine than typical coffee. I've never personally developed a taste for coffee, so when I have a craving for hot caffeinated beverage I tend to make triple-strength black tea. Mmmmmm, polyphenols.

  71. Re:Hmm ... nigger by Runaway1956 · · Score: 1

    Yeah, you're right. Almost all ethnic jokes are generic, and with only a rinse, they can be re-used for many other nationalities, religions, colors, or whatever. I miss the days when I was young, in a city roughly divided into four parts - the whites, the blacks, the Italians, and the Slovaks. We insulted each other, but we worked hard to be original. You KNEW that you were cool if you came up with something of your own, and the following week all four groups were using it to bash each other.

    Oh yeah - my tribe is definitely superior. There are only two kinds of people in the world, after all. Us Polskis, and all the rest of you who wish you could be Polish!

    --
    "Windows is like the faint smell of piss in a subway: it's there, and there's nothing you can do about it." - Charlie Br
  72. Re:Programming in Java Makes Me Want to Kill Mysel by shutdown+-p+now · · Score: 1

    Next thing you're going to say is that they let you declare variables just about anywhere. Kids these days, such fantasies!

    Now get off my lawn.

  73. Re:I like not equals assignment operators by JesseMcDonald · · Score: 1

    Assignment could be a left arrow (&larr;, U+2190), as in Smalltalk. Now that we have UTF-8 text files and Unicode fonts we wouldn't even need to play around with character substitutions. Of course, we'd need to fix Slashdot's handling of simple printable Unicode characters at some point...

    --
    "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
  74. Re:Hmm ... nigger by Anonymous Coward · · Score: 0

    Oh yeah - my tribe is definitely superior. There are only two kinds of people in the world, after all. Us Polskis, and all the rest of you who wish you could be Polish!

    If all of the rest of us were Polskis, wouldn't there be trouble changing light bulbs?

  75. In summary... by not+already+in+use · · Score: 1

    They're attempting to replicate C# 5's feature set, and using a reasonable timeline it won't be ready until C# 6 is released. FOSS is going to fall victim to NIH syndrome, or more specifically, NIBM (Not invented by Microsoft) syndrome.

    --
    Similes are like metaphors
  76. You're not qualified to talk. by Anonymous Coward · · Score: 0

    "I have taught Java for years, because many colleges think it is a good first language to learn. Only recently have I actually attempted to develop commercial quality applications in it....."

    It's a good thing that the developers of the world didn't wait until the Academia Eggheads were 100% satisfied with a totally polish language so they can build revenue generating apps.

  77. Annotations by guybrush3pwood · · Score: 1

    What do you guys think of this? In Scala, things like throws are annotations (at least so I read here). In Ceylon, things like shared are annotations. In Java, though, they're "reserved words".

    The Scala and Ceylon approach seems, at first glance, a consistent one, in the sense that those things are information about the code, which qualify to be called "meta-programming". What I mean is: if you strip all classes of those "private", "final" and "throws", they'd still do the same thing. Thus, it seems to fit the "meta-information" concept.

    Just for fun, the last few weeks I've been toying with the syntax of a programming laguage in which all these things are meta-information. The programmer can, in fact, create his/her own annotations which and be directly used in the code, without a marker operator (such as Java's @) to make the task of the parser simpler. It would, in turn, make the language appear extensible.

    In order to do this, the reserved word private, for instance, is removed from the list of the language's reserved words, and implemented as an annotation. That annotation is part of a library distributed with the compiler, pretty much like distributing the java.lang package along with the javac compiler, and making all of its classes usable without import statements. I borrowed the idea from the Scala "syntactic sugar" for operators. Scala folks cleverly say that this: 1+1 is syntactic sugar for this: 1.+(1).

    My idea is to allow the programmer to use a simple syntax when applying an annotation on an artifac (a class, an interface) that looks, when reading the code, like it is part of the language. private final class MyClass would become an abbreviated form of this: @private(value=true) @final(value=true) class MyClass. In the Celyon slides, doc is an annotation, by is an annotation, and so on. So I think they beat me to it.

    I'm far from pretending to be an expert in programming language or compiler design, nor have experience with a huge span of languages. But I believe the compiler should work for the programmer, and make his life easier, and not the other way around.

    --
    Perhaps I'm trolling, perhaps I'm not.
  78. you can do Copy on write in c++ by js_sebastian · · Score: 2

    My number 1 missing feature in Java is the ability to set object references to be 'copy on write'.

    I'm doing numerical/scientific programming. Say I have an object which contains an array, and a 'get' function to return that array. Currently I have two choices: I can return a pointer to my object's array, or make a copy of the array and return that.

    Returning a pointer is very fast, but now my class is at the mercy of callers which might write into my array. Returning a copy is safe, but so long as the callers behave themselves and don't try to write to it, is a waste of time and memory. If I could return a "copy-on-write-reference" to my array, I'd get the best of both worlds.

    Any reference reached via a copy-on-write-reference would also need to be copy-on-write. If you make copy-on-write a qualifier on a variable, this could be all enforced by the compiler.

    Are there any languages which do something like this?

    You don't need the compiler to know about copy-on-write. To write a generic copy-on-write pointer class it is enough to have a compiler that knows about const-ness, as well as operator overloading that also allows overloading pointer operations (dereference..). Both features are available in C++, and in fact some implementations of STL string have used copy-on-write. Like reference-counting, performance becomes horrible with multiple threads because of the extra locks that are then needed.

  79. Not at all by Anonymous Coward · · Score: 0

    Should be easy to make a VM for Ceylon. So what if it runs Java as well?

    1. Re:Not at all by Anonymous Coward · · Score: 0

      Should be easy to make a VM for Ceylon. So what if it runs Java as well?

      Since TFA says Ceylon will run on the JVM, that means Oracle will be interested in whatever you use to run Ceylon. Unless Google really hammers Oracle in their current lawsuit, any VM such as you describe had better just plan on paying fees to Oracle and letting Oracle control what you can do with the VM.

      Note that this is less of an issue in the enterprise. As I understand it there is a perfectly usable JVM under a free software license, and you can just run that on your servers. Where it gets more interesting is the tiny Java for mobile use. There, Oracle really wants you to license their mobile Java; Google tried to avoid licensing Java by building their own VM (Dalvik), and Oracle is claiming that Dalvik infringes on JVM patents.

      If they really want to replace Java, they should make a truly obviously free VM to run their new language.

  80. Will go the way of Diaspora by luis_a_espinal · · Score: 1

    No method overloading? I can understand no operator overloading, but no method overloading? They got to be kidding. Some things like nullable types are worth pursuing, but in the face of serious contenders like Scala which are already being used in the enterprise, the whole enterprise has a Diaspora'ish feel to it.

  81. Don't see how this is simpler... by Anonymous Coward · · Score: 0

    So one example he has in the slides is:

    repeat(3)
    void process() {
    // blah
    };

    This is to represent that the function, process(), is defined inline and used in the repeat(int, func) method. The part that bugs me even more is that I think, based on the optional parameters implementation, that the following code would also compile cleanly:

    repeat(3); // note the semicolon terminating this line
    void process() {
    // blah
    }; // semicolons are still okay in this situation

    Now if the compiler says both are okay, then this becomes a possible source of bugs...

    But just looking at either versions of that code, I can't see how that is inherently simpler than a standard java inline class:

    void repeat(int times, new Repeatable() {
    void process() {
    // blah
    }
    });

    Sure, you have an extra class definition floating around, but as far as readability goes I can visually see that the Repeatable interface is required for the method call, and I'm providing an instance that I know is part of the parameters for the repeat() method...

  82. copying by hey · · Score: 1

    Java copied C++ and added GC.
    C# copied Java and added nicer syntax (and a nice Windows GUI builder)
    Now Ceylon is copying C# and added Linux friendliness....could work.

  83. Ceylon by Anonymous Coward · · Score: 0

    Constructors Exist, Yet Lack Overloading? Nothanks.

  84. Serious Enterprise Developer by SJS · · Score: 1

    Anyone who does not appreciate what JEE brings to the table is not a serious enterprise developer.

    I *appreciate* what J2EE brings to the table.

    That doesn't mean I _like_ it.

    I generally agree with your list (with AJAX and WSDL being a notable exception; those are flaws, not a features, but the evils of AJAX and WSDL are another discussion entirely), but feel that it misses an important point: J2EE is just nasty.

    It's like C++ -- the *list* of features does not mitigate the sheer soul-draining /wrongness/. And like C++, it's a reasonable "early effort", and we're now at the point of needing someone to look at J2EE with a critical and analytical eye, and to devise for J2EE what Java was to C++: something, while perhaps not perfect, is a few orders of magnitude *better*.

    Your list is an important place to start, if not in actual features, then in issues addressed by those features that any successor *must* address just to get a seat at the table.

    --
    Pick One: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html (Note - disable Javascript first!)
  85. why don't they use jruby or jython by mAriuZ · · Score: 1

    why don't they use jruby
    http://www.jruby.org/
    or jython ?
    http://www.jython.org/
    inventing yet another languge when there so many to choose from doesn't seems to be too smart
    i can give only one failure go language that is now falling from top 10 if you watch tiobe
    http://www.tiobe.com/content/paperinfo/tpci/index.html
    also another failure is Groovy used with grails:
    "Other interesting moves in the TIOBE index this month can be found outside the top 20. This is due to the fact that the index uses 7 different search engines as of this month. Some promising languages lost many positions. Most striking examples of this are NXT-G (down from 19 to 54) and Groovy (from 25 to 65)."

    --
    developer http://flamerobin.org
  86. Aliases are not references, etc. by tomhudson · · Score: 1

    Um, there are conventions where no stack is used to pass parameters.

    Not for objects in java, and that's what we're talking about. You cannot pass an object in java - only a reference to it. The object is allocated on the heap, and that's where it stays.

    An when you get to the level of writing assembler, a stack is purely optional.

    If the language didn't actually allocate an object pointer variable distinct from the object itself, I'd concede your point. In that case, the memory location aliased by a variable would be the actual object, and that would arguably be a pass-by-reference language. It would also be a noticeably different language.

    I think you need to clarify what you wrote - it doesn't parse cleanly. :-)

    Java works the same as c and c++. When you allocate a new object, it is allocated on the heap, and you only get a pointer (reference) to it, not an alias. You can never pass an object in java, (unlike primitives), just the pointer to it, so not everything is passed by value. Objects cannot be passed by value.

    Let me fix your example:

    // The compiler translates this to "Object s = new String("can't touch this");
    Object s = "can't touch this";

    // In your next line, you create a new instance of type Object - the base class, using the default (empty) constructor, not a null object.
    Object t = new Object();

    // at this point neither s nor t are null
    foo( s , t );

    You're free to set them to null inside of foo, if that floats your boat.

    I hope this clarifies things. :-)

    1. Re:Aliases are not references, etc. by SJS · · Score: 1

      You're the one who brought up assembler, and expanded the topic beyond just objects in Java. So, no, that's not just what we're talking about -- we're talking about the *concept* of pass-by-reference, and then applying that to Java. You've expanded the scope of the discussion, so it's ingenuous for you to try to narrow it back down again.

      Your "fix" to the provided code merely demonstrates that you are unfamiliar with the concept of pass-by-reference, and thus are not qualified to hold an opinion on the subject. Please go and take an introduction to programming course from a reputable institution. This is a concept any second-year computer-science student should have been exposed to.

      You keep getting hung up on where the objects are created, instead of paying attention to variables and parameters.

      Seriously, did you even bother to run the code? And then contrast that with a language that is acknowledged to have pass-by-reference semantics?

      It doesn't look that way to me. :(

      --
      Pick One: http://www-rohan.sdsu.edu/~stremler/sigs/sigs.html (Note - disable Javascript first!)
  87. TomHudson stalks & trolls others as AC on /.? by Anonymous Coward · · Score: 0

    "Wait until he starts on another kick, then reply to him as an AC. It's the new meme". - by tomhudson (43916) on Sunday May 09 2010, @08:29PM (#32150544) Homepage Journal

    QUOTED VERBATIM FROM -> http://slashdot.org/comments.pl?sid=1646272&cid=32150544

  88. Re:TomHudson stalks & trolls others as AC on / by Anonymous Coward · · Score: 0

    That was a year ago!

    And only the bravest among us would reply to you non-anon. Who wants to be stalked all over Slashdot?