Slashdot Mirror


Java 1.5 vs C#

SexyFingers writes "Sun released Java 1.5. The non-API stuff that they've added made it finally "catch-up" with C# - since both languages are built to support OOP from the ground-up, their constructs become almost identical as additional OOP "features" are supported. So if you're doing C# and your foundations in OOP are rock-solid, there really isn't any difference whether you're coding C# or Java."

Here's the list of enhancements to the Java Language:

  1. Generics (C# 2.0 already supports this)
  2. Enhanced For-Loop (the foreach construct in C# 1.0, duh!)
  3. Autoboxing/Unboxing (C# 1.0 already has this, everything is an object, even the primitives - not really, but they do it so well...)
  4. Typesafe Enums (again C# 1.0 already implemented this, but I think they've added a little bit more twist in Java, that its actually a better implementation)
  5. Varargs (C# 1.0's params construct, ellipsis construct in C++)
  6. Static Import (I don't know if C# 1.0 has this, or C#2.0, but C# has a construct for aliasing your imports - which is way cooler. Static Import, actually promotes bad coding habits IMHO)
  7. Metadata/Annotations (this is C# 1.0's Attributes, Sun's upturned noses just gave it a fancier name - also, C#'s implementation is better and more intuitive)

They've beefed up the API some, and integrated several packages with the regular JSDK that used to be a part of a separate package or installation ---in my NSHO, the Java API has become bloated...

At this point (even before Whidbey) the deciding factor (as always) for Enterprise work, when choosing a language platform, should be the support it has behind it, in terms of IDE, tools, api, and longevity of the vendor pushing it (forget the OpenSource crap argument, those guys are too in love with Perl, Python, and Ruby - Java could become the child nobody wants to talk about if Sun dies) - right now that's C# and the .NET Framework ---

If you ask Paul Graham though, both language would be utter crap and fit only for idiots :) http://www.paulgraham.com/gh.html [I'm exaggerating, so hold off on those flames.]

28 of 790 comments (clear)

  1. Varargs? by American+AC+in+Paris · · Score: 5, Funny

    That sounds like it should be some Adams-esque race of semi-competent space pirates...

    --

    Obliteracy: Words with explosions

    1. Re:Varargs? by Anonymous Coward · · Score: 1, Funny

      That sounds like it should be some Adams-esque race of semi-competent space pirates... ...much like the two languages in question...

  2. Learn to write? by Palshife · · Score: 5, Funny

    I've never seen so many grammatical errors. You win.

    --
    Attention deficit disorder is a complicated issue, spanning several major... HEY LET'S GO RIDE BIKES!
    1. Re:Learn to write? by American+AC+in+Paris · · Score: 5, Funny

      Don't think of it as loaded with grammatical errors. Think of it as Compiled with (0) errors, (472) warnings ...

      --

      Obliteracy: Words with explosions

    2. Re:Learn to write? by Tumbleweed · · Score: 2, Funny

      I'd love to see his version of Hello World. :)

    3. Re:Learn to write? by mog007 · · Score: 2, Funny

      Maybe he takes Microsoft's stance on the issue...
      "It compiles... ship it!"

  3. what about... by syrinx · · Score: 4, Funny

    and you're foundations in OOP is rock-solid

    What about our foundations in English?

    --
    Quidquid latine dictum sit, altum sonatur.
    1. Re:what about... by yoyhed · · Score: 3, Funny
      You missed another:

      and you're foundations in OOP is rock-solid

      Come on, people. Conjugate.

      --
      WHO NEEDS SHIFT WHEN YOU HAVE CAPSLOCK/ DAMN1
  4. Re:Fix the link by AKAImBatman · · Score: 2, Funny
    You should have seen the original story from the future. It said, "Sun releases Java". Pretty short intro. :-)

    It turned out that the submitter (or someone editing the article) lost the rest of the link when they submitted it. Thus the source code showed:
    Sun releases <A href=" http:// Java 1.5</A>

    (lots more text here)
  5. What Language by jcook793 · · Score: 3, Funny

    What language was this post written in? Amazing.

    1. Re:What Language by logic+hack · · Score: 1, Funny

      Shhh, you'll start a perl flamewar ;)

  6. Re:All in it together by Gherald · · Score: 2, Funny

    > How about a cross-compiler that takes advantage of this vendor competition in cooperation to combine both communities of programmers into one pool targeting either virtual machine?

    And in other news, Microsoft decides to bundle Cygwin with Longhorn...

    (ok so maybe Mono could do Java, not that I understand why they'd want to)

  7. Re:All in it together by Cannelbrae · · Score: 2, Funny

    Quick, someone email Bill. Slashdot wants Java.NET. ;)

  8. Version by xPhoenix · · Score: 4, Funny

    So which version number is it? Java 2, Java 1.5, or Java 5? Someone should teach these guys to count before they start coding!

  9. Heh by KoolDude · · Score: 2, Funny


    SexyFingers writes "Sun released Java 1.5...

    The ultimate question is... how did you get those sexy fingers ? Java, C# or... Pr0n# ?

    --
    getSexySig(); /* returns sexy signature */
  10. AVP by pizza_milkshake · · Score: 4, Funny
    It's just like Alien vs. Predator:

    whoever wins, we lose.

  11. Maybe I'm an oldtimer, but... by Tony · · Score: 4, Funny

    C'mon, C# vs. Java? Outside of "RIAA sues 86 year-old grandma", "We hate Bush, let's talk" and "Microsoft patents KDE" there is no better source of inflammatory material in the dorkosphere.

    Oh, how I pine for the days of vi vs. Emacs.

    - Tony

    --
    Microsoft is to software what Budweiser is to beer.
  12. Re:So this is what... by teromajusa · · Score: 2, Funny

    See, you're just too in love with Python, Perl, and Ruby. I myself used to think that those were real and useful languages. Then I discovered that c# is maintained by Microsoft and I realized that they were actually crap.

  13. Netcraft confirms. by Anonymous Coward · · Score: 1, Funny
    It is official.

    Netcraft confirms: C++ is dying

    One more crippling bombshell hit the already beleaguered C++ distribution community when IDC confirmed that C++ market share has dropped yet again, now down to less than a fraction of 1 percent of all programming language distribution versions. Coming on the heels of a recent Netcraft survey which plainly states that C++ has lost more market share, this news serves to reinforce what we've known all along. C++ is collapsing in complete disarray, as fittingly exemplified by falling dead last in a recent programming language distribution study.

    You don't need to be a Kreskin to predict C++'s future. The hand writing is on the wall: C++ faces a bleak future. In fact there won't be any future at all for C++ because C++ is dying. Things are looking very bad for C++. As many of us are already aware, C++ continues to lose market share. Red ink flows like a river of blood.

    Bloodshed C++ is the most endangered of them all, having lost 93% of its core developers. The sudden and unpleasant departures of long time developers Jordan Hubbard and Mike Smith only serve to underscore the point more clearly. There can no longer be any doubt: C++ is dying.

    Let's keep to the facts and look at the numbers.

    Bloodshed C++ project leader Theo states that there are 7000 users of Bloodshed C++. How many users of Borland C++ are there? Let's see. The number of Bloodshed C++ versus Borland C++ posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 Borland C++ users. Bloodshed C++ posts on Usenet are about half of the volume of Borland C++ posts. Therefore there are about 700 users of Borland C++. A recent article put Bloodshed C++ distribution at about 80 percent of the market. Therefore there are (7000+1400+700)*4 = 36400 Bloodshed C++ users. This is consistent with the number of C++ Usenet posts.

    Due to the troubles of half-baked C++ apps, abysmal sales and so on, many development companies is going out of business and will probably be taken over by another company who will sell another troubled product. Now C++ is also dead, its corpse turned over to yet another charnel house.

    All major surveys show that C++ has steadily declined in market share. C++ is very sick and its long term survival prospects are very dim. If C++ is to survive at all it will be among dilettante dabblers. C++ continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, C++ is dead.

    Fact: C++ is dying

  14. Re:I want functions by e2d2 · · Score: 2, Funny

    There are people still arguing against OOP? How quaint.

    Why not argue against managed memory while you're at it.

    YES THIS IS A TROLL

    HITLER

  15. Re:APIs by EmperorKagato · · Score: 2, Funny
    The former has been in Java since 1.3, and the later since 1.1(!). Honestly, Java has every feature and the kitchen sink in its core APIs. And if a feature isn't there, it's very easy to write a library to add it. That's why programmers like Java so much
    Wow. That sounds very familiar. And to think people wonder why there is a large fanbase for linux.
    --
    ----- You know you have ego issues when you register a domain in your name.
  16. Quick summary of the comments by raider_red · · Score: 2, Funny
    I haven't paged through the comments yet, but I'll bet I can tell what will be posted:
    1. Java Sucks
    2. C# sucks more, and it's put out by microsoft, which is evil.
    3. Java's not so bad
    4. C# is better than Java
    5. Perl is better than either of them
    6. Python rules!
    7. "But I prefer [C/C++, Lisp, Fortran, Forth, etc.]"
    8. In Soviet Russia...
    9. I for one welcome our new [java|c#] overlords
    And of course, this post will be modded as flamebait.
    --
    It's good to use your head, but not as a battering ram.
  17. Re:Meanwhile, C++ goes nowhere by Anonymous Coward · · Score: 1, Funny

    C++ is a great language, but it's choosy about its friends.

    I love you.

  18. Re:I code C# for a living by Bloater · · Score: 1, Funny

    > VS.net vs Eclipse: no contest, VS.net is much worse.

    So you could say that VS.Net has been eclipsed. Heh... Sorry, that was terrible.

  19. Re:flamebait by mrogers · · Score: 4, Funny

    Large applications written in Java are bugs. ;-p

  20. pine? mutt by flok · · Score: 3, Funny

    Oh, how I pine for the days of vi vs. Emacs.

    You must have meant, of course mutt.

    --

    www.vanheusden.com - home of Multitail, HTTPing, CoffeeSaint, EntropyBroker, rsstail, bsod, listener, nagcon, nagi
  21. Re:I code C# for a living by Three+Headed+Man · · Score: 3, Funny

    Every time I see "C#" I always think of a funny comment from a poll, maybe 6 months back, of "What do you call #?" The options given were "Sharp, Hash, Pound, Channel, Tic-Tac-Toe sign" etc. The funny comment was "I call it the 'rap' sign. You know, as in C#"

    --
    I'm probably at the karma cap. Mod up a funny troll instead, it lightens the mood :)
  22. Re:I code C# for a living by k8to · · Score: 2, Funny

    Yes, OOP works beautifully, all you have to do is predict the future.

    --
    -josh