Slashdot Mirror


Java API and Microsoft's .NET API: a Comparison

Nerval's Lobster writes "Previously, developer Jeff Cogswell focused on the respective performances of C# and Java. Now he's looking at yet another aspect of the languages: the runtime libraries—what exactly the libraries are, how they are called, and what features the languages provide for calling into them. Examining the official Java API (now owned by Oracle) and the official .NET API owned by Microsoft, he finds both pretty complete and pretty much a 'tie' with regard to ease-of-use and functionality, especially since Java version 7 release 6 allows for automatic resource management. Read on and see if you agree."

319 comments

  1. Oracle vs Microsoft by ArcadeMan · · Score: 0, Troll

    Whoever wins, we lose.

    1. Re:Oracle vs Microsoft by Mitchell314 · · Score: 1

      'Win'? 'Lose'? They can't take away your choice to use a different framework/language on your own time.

      BASIC forever muddafuggas ! :D

      --
      I read TFA and all I got was this lousy cookie
    2. Re:Oracle vs Microsoft by Anonymous Coward · · Score: 1

      Apparently he's a corporate drone, he will follow one of these corporations blindly and unquestionably, the only thing to decide is which one.

    3. Re:Oracle vs Microsoft by ArcadeMan · · Score: 2

      Maybe I'm a corporate drone that can only do so much as advise my superiors that either choice is wrong, but they receives "gifts" from either company.

  2. I don't want to be "that guy", however by paysonwelch · · Score: 4, Interesting

    However, I mostly code in C# .NET and I dabble in Java in my spare time to model financial markets. What I have found is that C# has some powerful features that other languages do not have. This allows the .NET framework to be a little more robust than Java. Also my opinion is that C# and .NET creates a more syntactically elegant and coder friendly experience whereas Java is good, but not as good as .NET. In closing, C# .NET > Java. Please address .NET hate-responses to /dev/null

    1. Re:I don't want to be "that guy", however by Xest · · Score: 3, Interesting

      Microsoft has had the benefit of being the single controller of the .NET framework whilst Java has been victim of design by committee a lot of the time. This is why the .NET framework has managed to stay tidier and more focussed, but as I said in my other post what does it matter, because who the fuck sticks to just the core framework anyway when there are things like Spring out there?

    2. Re:I don't want to be "that guy", however by The+End+Of+Days · · Score: 0

      I like C#. .NET is fine for what it is, although it's very apparent where the influences came from. Where Java absolutely wins, in my experience, is the sheer volume of libraries available. You can do damn near anything with some dependency declarations and a bit of glue code.

    3. Re:I don't want to be "that guy", however by Synerg1y · · Score: 0

      The file menu on Visual Studio is better than Eclipse's UI design & features as a whole. Imho, the languages are both entirely OOP based and are very similar in syntax and functionality.

      Source:
      I learned with AP Java moved on to ASP.NET in college upon introduction to it.

    4. Re:I don't want to be "that guy", however by OhSoLaMeow · · Score: 5, Funny

      In closing, C# .NET > Java. Please address .NET hate-responses to /dev/null

      Your windows environment has /dev/null?

      How cool is that?

      --
      They can take my LifeAlert pendant when they pry it from my cold dead fingers.
    5. Re:I don't want to be "that guy", however by Synerg1y · · Score: 1

      Anybody who isn't a massive corporation is better off sticking w the core framework for maintainability & scope purposes.

    6. Re:I don't want to be "that guy", however by Mitchell314 · · Score: 5, Funny

      Yes. It's c:\.

      --
      I read TFA and all I got was this lousy cookie
    7. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      In closing, C# .NET > Java.

      Please address .NET hate-responses to /dev/null

      Your windows environment has /dev/null?

      How cool is that?

      One word: Mono. Perhaps you may have heard of it?

    8. Re:I don't want to be "that guy", however by AmiMoJo · · Score: 4, Insightful

      This is the wrong question. What matters is the quality of the apps that are written in either language. In that respect C# is way ahead on the desktop, but in other areas Java is king.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    9. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Yes, we've all heard of Mono.
      I can't imagine that anyone has it installed, though.
      Either you use Windows, or you know better than to swallow that poison pill.

    10. Re:I don't want to be "that guy", however by Em+Adespoton · · Score: 1

      In closing, C# .NET > Java.

      Please address .NET hate-responses to /dev/null

      Your windows environment has /dev/null?

      How cool is that?

      One word: Mono. Perhaps you may have heard of it?

      Heard of it, yes. Thankfully I've never got Mono.

    11. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      In Visual Studio a SerialPort is a drag-and-drop item, even though you could just as easily instantiate and use one(or three) manually. With java you're stuck dicking around with third-party libraries like RxTx and jumping through hoops to get its basic functionality working.

      The only aspect besides cross-platform interoperability where Java smashes C#, that I can see in my very limited experience, is that Java events and handling are much more simple. No tangled unreadable messes of delegates, updateCallbacks, overloaded operators, and inconsistent use of method() parenthesis conveniently omitted when methods are passed as parameters in the event handling structure. It's hard to get used to, and makes me want to choke the shit out of the people who thought all that mess was a good idea.

      And I know fucking everything.

      -- Ethanol-fueled

    12. Re:I don't want to be "that guy", however by iluvcapra · · Score: 5, Insightful

      Microsoft also had the benefit of Java going first and making all the mistakes, and then Microsoft got lucky when Java lost its first-mover advantage chasing down several blind alleyways -- "Applets", Sun's mismanagement, a bureaucratic open source strategy.

      --
      Don't blame me, I voted for Baltar.
    13. Re:I don't want to be "that guy", however by KingMotley · · Score: 2

      Yes, although we call it NUL: or \Device\Null

    14. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 1

      Before we even start, let me say:
      The whole point of .NET is deliberate and willful anti-competitive behavior. Because MS threw a temper tantrum like a four-year-old child after its attempt to murder Sun by EEEing Java failed. On those grounds alone it should be flat-out illegal.

      Now on to the subject at hand:
      Excuse me, but if you're still sitting in your tiny little box of primitive programming languages, you don't exactly get to laugh at other languages that are just as primitive except for some minute non-noteworthy differences.

      If you had said Haskell or something equally advanced, I would have agreed. But this? This is just /silly/!

      Also, what the hell is the point of a runtime machine that only runs on ONE OS which is also a consumer operating system? (Mono does not count as "running". Try running any .NET 4.x stuff on it.) Besides the aforementioned anti-competitiveness: NOTHING.

      The end.

    15. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 1

      Please address .NET hate-responses to /dev/null

      I'm getting "Could not load file or assembly '/dev/null' or one of its dependencies" when I try that.

    16. Re:I don't want to be "that guy", however by paulpach · · Score: 5, Insightful

      I am both a professional java and C# developer. Each one has their advantages:

      On the C# camp:
      * delegates and events
      * functional constructs
      * automatic variable types
      * LINQ
      * Value types (efficiently allocate thousands of value objects in an array, you need some really nasty workarounds in java)
      * Generics that keep their types at runtime

      On the java camp:
      * Spring (There is Spring.Net, but lets be honest: it does not compare)
      * Collections library (much more complete and better thought out than C#'s)
      * Maven
      * J2EE
      * A million other libraries freely available, that do _anything_ you want.
      * Portable to more platforms (Mono sometimes leaves something to be desired)

      So in my humble opinion, C# is much more complete as a language, but java has much better libraries and community. So which one would I pick? well, it depends on the project, the platform, and the amount of code I can reuse from open source libraries.

    17. Re:I don't want to be "that guy", however by Darinbob · · Score: 1

      I don't use C#, however last I looked all of its features were borrowed from other preexisting languages, same as Java. Is there something new and Microsoft for once in its life has done something novel?

    18. Re:I don't want to be "that guy", however by Darinbob · · Score: 4, Informative

      While Mono allows C#, it does not turn .NET into a cross platform executable environment. Practical programs using C# and .NET are tightly tied to Windows capabilities. Since C# isn't a standardized language, and Microsoft doesn't even stick to their own standards with their own products anyway, there will be incompatibilities between Windows .NET and Mono. Mono also does not re-implement all of the .NET framework and is playing catch up whenever there's a new inevitable .NET release. So if you want a cross platform executable system you are much better off with Java.

      Basically the whole reason for existence of .NET was to tie the developer to Windows. It was created as a direct response to Java being a cross platform system.

    19. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Groovy smokes them both in terms of ease of use and features.

    20. Re: I don't want to be "that guy", however by Anonymous Coward · · Score: 1

      LINQ, PLINQ, and the TPL. Pretty wicked combo. Check it out.

    21. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Your windows environment has /dev/null?

      How cool is that?

      Meh

    22. Re:I don't want to be "that guy", however by gutnor · · Score: 1

      C:/ where data goes to die.

    23. Re:I don't want to be "that guy", however by phantomfive · · Score: 2

      Please address .NET hate-responses to /dev/null

      You would have more luck with that if you'd actually had some substance in your post. You basically said, "I like .NET better than Java," but didn't explain why.

      Specifically I'd like to hear why you think the .NET framework is more robust than Java. Of all the reasons I could think of for supporting .NET over Java, that is not one of them. What makes you say it's robust?

      --
      "First they came for the slanderers and i said nothing."
    24. Re:I don't want to be "that guy", however by benjymouse · · Score: 5, Informative

      I don't use C#, however last I looked all of its features were borrowed from other preexisting languages, same as Java. Is there something new and Microsoft for once in its life has done something novel?

      LINQ is a pretty big deal. I don't know of any language that has something similar. LINQ itself is comprised of a number of language constructs such as expression trees, extension methods, type inference, anonymous types.

      Async/await is huge! Right there, MS looks to leapfrog other platforms by allowing developers to create robust, asynchronous programs that doesn't need to spin up threads (or use threadpools) to achieve perfectly composable asynchronous methods.

      Dynamic support (statically typed to be of dynamic type) allows the best from dynamic languages to be used from within C#, even interop'ing with dynamic languages and e.g. use an object created in Ruby as a first-class object in C# (or vice versa).

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    25. Re:I don't want to be "that guy", however by PlastikMissle · · Score: 4, Informative

      C# isn't standardized? Someone should call ECMA and ISO then and tell them they've been had.

    26. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Thank you for not elaborating on any of those points.

    27. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 1

      What a bunch of FUD. C# is standardized by the ECMA.
      The .net framework is designed to be portable because Microsoft Windows specific items were put in a Microsoft namespace.

    28. Re:I don't want to be "that guy", however by Michalson · · Score: 5, Interesting

      Microsoft has also had the benefit of Anders Hejlsberg being the lead architect, one of the best minds in the industry. There are maybe a handful of people in the industry today that can stand at the same level as him, and none currently alive that can stand taller. Hiring him away was a major boon to Microsoft and a crushing blow to Borland.

    29. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 1

      I haven't found anything that Java offers that isn't available, usually as a free/open-source library for .Net. There are some IDE extensions, but I generally find most of them disrupt me more than help (my own opinion)... VS2012 is dog ass slow though, and the web/javascript project support is really lagging alternatives (IntelliJ/WebStorm for example). I still prefer C# (generics, more declarative syntax, slightly simpler dependency injection and communications models, much easier web site/service development frameworks).

    30. Re:I don't want to be "that guy", however by benjymouse · · Score: 4, Interesting

      Microsoft has also had the benefit of Anders Hejlsberg being the lead architect, one of the best minds in the industry. There are maybe a handful of people in the industry today that can stand at the same level as him, and none currently alive that can stand taller. Hiring him away was a major boon to Microsoft and a crushing blow to Borland.

      As much as I love to code in C#, I think that Martin Odersky is at least as smart and knowledgeable as Anders Hejlsberg. I've seen them debate each other and IMHO Martin came out looking somewhat better. And Scala is no small feat.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    31. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      And Ruby/Python don't offer what the .Net core libraries, or what Java does out of the box, so nobody should use them either..? Just because a given tool doesn't have 100% parity doesn't mean it isn't useful, and/or should be avoided.

      You can use Mono to write cross-platform apps relatively easily. Unity (the game platform, not MS's IoC stuff) is build around it, and even Xamarin is growing it a lot. No there isn't 100% parity, and the fact is, a lot of what isn't there is what directly ties it to windows, but for the most part, people aren't using those bits. I won't argue the motivations for creating .Net as a development platform, where the name was a much better fit than elsewhere at the time when MS was using ".Net" to brand everything under the sun. .Net's generic support alone makes it worth looking at (even on Linux/OSX).

      All of that said, I mostly do server-side and/or web development, and NodeJS has been far more interesting to me lately than .Net ... that said, .Net is very stable, pretty robust, and has a lot of support/tooling. I've been thinking about moving a handful of my sites/apps to Mono, so I can drop one of my Windows VMs.

    32. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Say what you will about Microsoft, but at least they're not Oracle.

    33. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Except MS reallocated most of the Iron* and DLR devs to other projects, letting them fester... I lost my interest when the killed Managed JScript, or whatever the DLR JScript runtime was called. It's helpful for some types of COM interaction, but is mostly a pain without real Duck Type checking support.

    34. Re: I don't want to be "that guy", however by dyeazel · · Score: 1

      I couldn't agree more. There are a lot of basic things I've struggled finding support for in Java. The typical response is: "Jave is powerful. You can just write your own native support for that." The point is, with a mature language that's been around for so long, I shouldn't have to find a third party library or write my own support for something basic like serial port access.

    35. Re:I don't want to be "that guy", however by ILongForDarkness · · Score: 1

      To be fair async still uses threadpools and you have to be careful how you use it so you don't starve it but yeah Linq, async and dynamic are all big deals. I'd also add how maintained it is. Thinking of the recent java volunerablity they new about it for something like 8 months I think before patching it. As bad as MSs rep is I don't think they would do that. Their ecosystem revolves on tools and platforms to keep the windows and Office (and SQL and sharepoint) the platform of choice for IT/devs. What does Oracle really gain with Java? Its a nice to have thing but not critical.

    36. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Async/await looks promising, but it certainly is still complicated enough (or the engineers verbose enough) that it is a lot more complicated to pick up than it needs to be. Especially since what it actually does, doesn't seem to match up with what they tell you it does. At least in the simple cases they use for examples.

      Grand Central Dispatch has had similar functionality. The key differences being that Await has more concise syntax for the simple cases, but it gets progressively uglier the more complicated your cases become (such as awaiting a group of tasks that can all be done in parallel to each other). GCD's syntax starts off somewhat ugly, but doesn't really change as you do more complicated things, partly because the syntax already assumes you probably want to use blocks/lambdas by default so you can spin off 2-3 lines of code that don't really need a full function.

    37. Re:I don't want to be "that guy", however by benjymouse · · Score: 1

      To be fair async still uses threadpools and you have to be careful how you use it so you don't starve it

      That is incorrect. async does not use thread pools. Async by itself says nothing about threads, and - more importantly - it will NEVER spin up a thread or take a thread from a threadpool by itself.

      It is true that you can start parallel execution yourself and then use async/await to synchronize, but async/await is really a more fundamental concept compared to threads.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    38. Re:I don't want to be "that guy", however by jrumney · · Score: 1

      And since the OP brought up "robust",

      * Checked exceptions.

    39. Re:I don't want to be "that guy", however by Algae_94 · · Score: 1

      If your going to post a ".NET hate response" I imagine your system has a /dev/null/

    40. Re: I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      https://github.com/scream3r/java-simple-serial-connector

      find the soul, if you know the search.

      --Chalz

    41. Re:I don't want to be "that guy", however by benjymouse · · Score: 3, Insightful

      Especially since what it actually does, doesn't seem to match up with what they tell you it does. At least in the simple cases they use for examples.

      Citation needed. Care to elaborate?

      Grand Central Dispatch has had similar functionality. The key differences being that Await has more concise syntax for the simple cases, but it gets progressively uglier the more complicated your cases become (such as awaiting a group of tasks that can all be done in parallel to each other

      You mean like
      await Task.WhenAll(task1, task2, task3); ?
      You find that too complicated? I am curious how you would make that code simpler in Java, Objective-C or C?

      GCD's syntax starts off somewhat ugly

      Indeed

      ..., but doesn't really change as you do more complicated things, partly because the syntax already assumes you probably want to use blocks/lambdas by default so you can spin off 2-3 lines of code that don't really need a full function.

      Apart from being verbose and ugly, GCD still does not solve the problem with composability of asynchronous operations. GCD is the equivalent of TPL (Task Parallel Library) in .NET or Futures in Java.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    42. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      The .net framework is designed to be portable because Microsoft Windows specific items were put in a Microsoft namespace.

      Well Windows RT is portable too. You can carry it around with your Win RT tablet all day long.

      Maybe you're confused about what 'portable' means when it comes to software design. I don't think porting from one Microsoft environment to another Microsoft environment counts.

    43. Re:I don't want to be "that guy", however by Prof.Phreak · · Score: 2

      Wake me when C# programs run on anything other than Windows. GP is absolutely correct---if you actually try to use Mono for anything serious, you realize how quickly it starts to suck.

      --

      "If anything can go wrong, it will." - Murphy

    44. Re:I don't want to be "that guy", however by Darinbob · · Score: 0

      Not really sure what LINQ is exactly, but it sounds a bit like SQL embedded within a language. Couldn't you do the same thing with a library call? What about Perl being able to query and filter data that it has?

      Async is (or was) a pretty standard feature in some languages and run time systems and operating systems. Usually it's just a library or operating system you can use, but ya, that's not integrated into the language itself. But consider Ada with asynchronous transfer of control. Erlang has asynchronous stuff, but maybe that looks too much like message passing. Certainly Smalltalk allowed you to have blocks executed asynchronously. Though it all depends upon what your definitions are, it's too easy to say that it's just boring old message passing and it's not really in the language unless there's some special syntax for it.

      (Actually, come to think of it, it's probably a truism that if you can't implement something using basic Smalltalk features then you gave up too soon.)

      For typing, what about Common Lisp? Can go totally without declared types if you wish, or you can declare them and have them enforced, and CL is most certainly a dynamic language. (and this sort of typing was actually borrowed from MDL, the language used to implement Zork)

      There's nothing really new in programming languages for awhile now. Mostly these are older features or ideas, either rediscovered by newer generations or people outside of academia, or else a new combination of features.

    45. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 2, Informative

      The reason for .Net is not to tie developers to Windows. Microsoft just doesn't care about developers on other platforms. It's not malice, just laziness.

      That said, it's important to know where .Net came from. Others have already pounced on the C# standardization comment, so I'm going to skip that part, but here's the rest as best as I can figure it out.

      In the early 90's, Java became a thing. And it was good. Slow, but good. It steadily improved, and eventually, the hype wave washed it ashore on Windows-land. Microsoft even maintained it for Sun back then.

      Then Microsoft asked "wouldn't this be better if it didn't suck?" So they worked on it. They "improved" on it. Thus was born the Windows-only J++ language. It was Java, only with extra stuff to make it work more Windows-y. Around the same time, Microsoft started considering the possibility of making the JRE also not suck. To that end, they hired Anders Hejlsberg and let him loose in the managed runtime labs to play with (torture?) JRE and VBRUN (oh, yes, we all remember VBRUN##).

      Sun took note of this and simultaneously had a coronary and crapped their pants. Here was an accused monopoly abuser (not yet convicted of it, though) stomping on their turf. A lawsuit was born. This likely also accelerated the development of the .Net CLR, which was undoubtedly already underway by now. In the end, Java was Sun's responsibility and Microsoft no longer was allowed to maintain it for their own platform, which had a monopoly.

      Thus the .Net CLR and .Net Framework were born. The betas were released. VB was a first-class citizen. This new Java-alike called C# (or is that ++++?) was introduced. And to round out compatibility and in a gesture of EEE-goodwill, J# (again, ++++?) was released as source-compatible Java for .Net. (Note: the final E, extinguish, came in 2005 when J# was released only as an optional add-on for VS2005.)

      Fast forward a few years. Java is at 1.4, and everyone wants generics. That same year, .Net 2.0 has generics. Java caught up within a few months, but it's never been equivalent to .Net again. .Net has been consistently a step (or two or three...) ahead since that time.

      I have no love for Microsoft, but I just can't bring myself to be bothered with Java anymore. It was crap back in the day, and it's crap now. As a .Net developer, being locked in to Windows kinda sucks, but hey, it pays the bills. I could direct my efforts to something more "academic", but mostly I just don't give a damn. I mean, hell, where can you write a web app, a web service, a mobile app, several console apps, and a handful of CMS plugins all in the same bytecode-compiled language and expect to have a working system that didn't make you want to kill yourself rather than maintain it? .Net does that for me. .Net. The laziest environment for the laziest programmers. Why stand on the shoulders of giants, when you can just string a hammock between a couple of them and sleep for a while?

    46. Re:I don't want to be "that guy", however by Nerdfest · · Score: 4, Insightful

      ISO is no longer a standards body in many people's opinion after some of their previous dealings with Microsoft. They can quite obviously be bought.

    47. Re:I don't want to be "that guy", however by cbhacking · · Score: 4, Informative

      Java is actually not "entirely OOP based" although it's close enough for most purposes. Example:

      17.ToString()
      works in C#. It (or the eqivalent 17.toString()) does not work in Java.

      In .NET, everything is an object. "int" is another name for Int32, which is a struct (stack-allocated, value-passed object) that inherits from Object and implements a number of interfaces (IComparable, etc.).

      --
      There's no place I could be, since I've found Serenity...
    48. Re:I don't want to be "that guy", however by cbhacking · · Score: 1

      As a matter of fact, it does. I mean, strictly speaking it's at \\.\C:\Windows\SUA\dev\null, but according to bash:
      $ ls -l /dev/null
      crw-rw-rw- 1 +SYSTEM 0 48, 0 Dec 5 2012 /dev/null
      $ uname -a
      Interix Jayne 6.2 10.0.7063.0 authenticamd AMD64_Family_21_Model_2_Stepping_0
      $ echo $SUA_ROOT
      /dev/fs/C/Windows/SUA/

      --
      There's no place I could be, since I've found Serenity...
    49. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      I agree C# is a better java than java. The tools just work as well.

    50. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 1

      LINQ is probably one of those things you might have to experience to appreciate. I'd wager I use a LINQ expressions in 15-20% of my code now (excluding declarations). LINQ allows me to transform, group, and compare disparate collections with an ease that I find tempting to overuse. The performance isn't always optimal, but the benefits in clarity and flexibility over loops and if statements really appeals to me. I'd say LINQ has imparted the most noticeable effect on my code of any other single advance I've experienced while coding professionally (since 2005)

    51. Re:I don't want to be "that guy", however by cavreader · · Score: 1

      "who the fuck sticks to just the core framework anyway "

      Someone who needs a solid and consistant application platform?

    52. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Also my opinion is that C# and .NET creates a more syntactically elegant and coder friendly experience

      This is true, but it can also create some ungodly unreadable and unmaintainable code, moreso than Java.

    53. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      I have been programming in Java and C# .NET both since 1.1. Sure I will agree that .NET has some features that are better than Java (Generics and reflection comes to mind). But some API in Java are just simply better (IO is extremely powerful and Stream in .NET are just bad). Even though Generics and reflection is much easier in .NET a framework like OSGi is only available in Java. There is more open source libraries available in Java and not just because Java is older; the mentality of it's developers are different. For .NET there is NuGet but that is nowhere near the power of Maven. Sonar is a brilliant Q&A tool for Java that supports .NET but not with the same ease (It will make you jump a lot of hoops for .NET). Let me just state the obvious: both languages are there own unique selling points and their weaknesses. But I will add this to it: the ones that flame bait on this topic did not put as much time in one programming language as he/she did in the other.

    54. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      If you look at the lambda examples from Java 8 it looks like the collections API now mimic LINQ. Dynamic support in Java is called Invoke Dynamic and available in Java 7. As for async; Java has the concurrency package to make up for that.

    55. Re:I don't want to be "that guy", however by c0lo · · Score: 1

      The .net framework is designed to be portable because Microsoft Windows specific items were put in a Microsoft namespace.

      Well Windows RT is portable too. You can carry it around with your Win RT tablet all day long.

      That would be a transportable OS.

      --
      Questions raise, answers kill. Raise questions to stay alive.
    56. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      I know people who use Mono in commercial environments successfully. And there's a bunch of open projects out there based on Mono, like Xamarin. So consider yourself woken.

    57. Re:I don't want to be "that guy", however by im_thatoneguy · · Score: 1

      I can write a perfectly good standard that doesn't run on any operating system. Lack of dev attention doesn't mean it's not a standard.

    58. Re:I don't want to be "that guy", however by phantomfive · · Score: 1

      Good call

      --
      "First they came for the slanderers and i said nothing."
    59. Re:I don't want to be "that guy", however by maccodemonkey · · Score: 2

      Wake me when C# programs run on anything other than Windows. GP is absolutely correct---if you actually try to use Mono for anything serious, you realize how quickly it starts to suck.

      I can't run a program written in C++ on every platform. Doesn't make it not a standard.

    60. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Groovy is terrible.

    61. Re:I don't want to be "that guy", however by subanark · · Score: 1

      Java has wrapper classes that (for the most part) do the same thing. E.g.
      Integer num = 17;
      String str = num.toString();

      In .NET int "inherits" from Object in that when you cast a struct like int to Object; it wraps it in a reference type, which can be assigned to null. The main thing Java is missing (in this example) in this is that int[] isn't assignable to Object[], but you can assign an int value in Java to an Object reference.

      That's not to say Java isn't missing other features (which give c# more ways to do things, but also make it more complex). E.g. there is no pass by reference in Java, only pass by copy of reference (and primitives). And this is not to say that c# has everything that Java has. E.g. Enums in Java are reference based, while c# is based on a primitive type (Java lets you give different implementation of each enum value for a method). In Java you will only see instances of an enum that is explicitly listed, while c# you can see unlisted ones, or ones that are "or" together.

      Ultimately, Java ends up being more verbose and easier to follow step-by-step logic, while c# is more compact, easier to write and express higher level concepts. If given a choice between c# and Java:
      For "Nuclear launch missile control" - Java, its easier to mathematically verify that it is doing what is expected (In reality FORTRAN is the way to go)
      For "Quick one time script" - C#, easier to write and you can avoid some boiler plate code that Java would require (Python/Ruby probably is better).

    62. Re:I don't want to be "that guy", however by Quattro+Vezina · · Score: 1

      Pretty much this. OSGi and Maven made me like Java. I used to say that C# was Java done right, but OSGi and Maven opened up an entirely new world for me.

      I don't think in terms of Java programs or even packages anymore. They're Maven artifacts and OSGi bundles (if you're structuring your projects right, there should be a 1:1 correspondence between the two, not counting POM-only parent projects).

      Wake me when C# gets something as cool as Maven and OSGi.

      --
      I support the Center for Consumer Freedom
    63. Re:I don't want to be "that guy", however by Quattro+Vezina · · Score: 1

      Add OSGi to the Java list. The entire concept is a stroke of brilliance, and it meshes so perfectly with Maven that I can't think of a better way to structure a large system than Maven+OSGi.

      --
      I support the Center for Consumer Freedom
    64. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Microsoft and .Net has had the benefit of Anders Hejlsberg and some of the other Delphi developers that MS poached.

    65. Re:I don't want to be "that guy", however by Chrisq · · Score: 2

      However, I mostly code in C# .NET and I dabble in Java in my spare time to model financial markets. What I have found is that C# has some powerful features that other languages do not have. This allows the .NET framework to be a little more robust than Java. Also my opinion is that C# and .NET creates a more syntactically elegant and coder friendly experience whereas Java is good, but not as good as .NET. In closing, C# .NET > Java. Please address .NET hate-responses to /dev/null

      I'm not saying its the case here, but often the best framework is the one you know best. Of course that is true for you personally, but its sometimes hard to distinguish "I'm not sure how to do it with that API" to "that API is not as clear as the one I know well".

    66. Re:I don't want to be "that guy", however by Chrisq · · Score: 1

      Microsoft has had the benefit of being the single controller of the .NET framework whilst Java has been victim of design by committee a lot of the time.

      True, but actually some of the "worst offenders" pre-dated the committee - like the UnsuppotredOperationException thrown from read-only collections (there should have been a ReadOnlyCollection interface with the Collection interface inheriting from that) and the whole Date, Calendar API which is dire

    67. Re:I don't want to be "that guy", however by Xest · · Score: 1

      I'm not sure that argument makes sense, using Java + Spring isn't going to leave your code any less vulnerable to maintenance and and scope issues anymore than using C# and the core .NET framework would.

      In fact, using a 3rd party framework like Spring will greatly improve maintainability because it provides methods that make far more sense than some of the standard Java library ones for common tasks, so you can right much more maintainable code, and you don't have to go out of scope writing fairly common things that aren't in the Java standard library, but are in Spring and similar.

    68. Re:I don't want to be "that guy", however by Xest · · Score: 1

      How do popular 3rd party frameworks prevent that given that some of them make more sense and are much better thought out than the Java standard library and are arguably better supported?

      The Spring framework for example implements more of the Java standards than the standard library itself does.

    69. Re:I don't want to be "that guy", however by JonJ · · Score: 2, Insightful

      He may be a genius, but .NET and C# are still tools for Microsoft to create a vendor lock-in. Color me uninterested.

      --
      -- Linux user #369862
    70. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      You forgot Java's more theoretical advantages, which facilitate formal verification and allow for some pretty nifty JIT. Beyond that, Java gives you a pretty good environment to learn object oriented programming in, as well as a lot of basic know-how like exception handling, threading and allow relatively easy (re)implementation of data structures. I realize these isn't exactly on any developer's top list, but they're some of the main reasons a lot of universities teach in Java (although my sample size is just 3).

    71. Re:I don't want to be "that guy", however by pijokela · · Score: 1

      Yes, that sounds nice, but it has not been the way Java is developed in years. Java projects use huge amounts of third party libraries all the time. The quality of Java third party libraries from Apache, Google and Spring is really great. IMHO the best thing in Java is that there is a library for everything.

      I think this may be quite different from the way .NET applications are developed?

      In more recent years some of the libraries have started to "fix" the missing language features in Java. While this is kind of amazing, I think it's the wrong direction. It's better to go to Scala, Clojure or just wait for Java 8.

    72. Re:I don't want to be "that guy", however by benjymouse · · Score: 2

      If you look at the lambda examples from Java 8 it looks like the collections API now mimic LINQ.

      But still no expression trees and no ad-hoc anonymous types so nothing resembling LINQ to Entities, LINQ to Twitter etc.

      Dynamic support in Java is called Invoke Dynamic and available in Java 7.

      The dynamic support in Java is in the VM only. You cannot use foreign language objects as first class objects from within Java. Essentially, Javas dynamic support was created to make dynamic languages on the Java VM platform not suck. It is not a Java language feature.

      C#s dynamic feature is support for dynamic languages the same way, but also lets you create objects in a foreign language and pass those to C# where they can be used as first-class objects.

      Take a look here

      As for async; Java has the concurrency package to make up for that.

      Javas concurrency package is roughly on par with .NETs System.Threading.Tasks and System.Collections.Concurrent. .NETs tasks are more elegant due to the ability to use lambdas

      Async/await goes beyond that and introduces syntactical notation where you can write asynchronous code and let the code resemble the logical flow even though dynamically the code executes asynchronously, i.e. the thread leaves and execution continues later when the event that is being awaited occurs.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    73. Re:I don't want to be "that guy", however by allcoolnameswheretak · · Score: 1

      More than anything, Microsoft has had the benefit of coming after Java. They took all the good parts, and learned from the things that were not so good.

    74. Re:I don't want to be "that guy", however by Ash-Fox · · Score: 1

      Your windows environment has /dev/null?

      How cool is that?

      You can access the null device in various ways in Windows:

      From the command line, you could do: type filename.txt > NUL

      Alternatively, in Microsoft's programming languages, you can usually pass it to \\.\Device\Null etc.

      --
      Change is certain; progress is not obligatory.
    75. Re:I don't want to be "that guy", however by Kawahee · · Score: 1

      which is a struct (stack-allocated...

      Eric Lippert would disagree with you:

      It is usually stated incorrectly: the statement should be "value types can be stored on the stack", instead of the more common "value types are always stored on the stack".

      --
      I'll subscribe to Slashdot when I see a month without a dupe, a typo, or an article the "editors" didn't read.
    76. Re:I don't want to be "that guy", however by Kawahee · · Score: 1

      if you actually try to use Mono for anything serious, you realize how quickly it starts to suck.

      I know people who use Mono in commercial environments successfully.

      As someone who uses Mono (in particular, Xamarin.Mac and Xamarin.iOS) successfully in a commercial environment, I know how much it sucks. Welcome to leaky abstraction, population: me.

      --
      I'll subscribe to Slashdot when I see a month without a dupe, a typo, or an article the "editors" didn't read.
    77. Re:I don't want to be "that guy", however by devent · · Score: 2

      Applets are still freaking good.
      Look at for example: http://jchart2d.sourceforge.net/applet.shtml
      I can get a full demo of the application in my web browser, how cool is that. IMHO the browser developers sunk Java Applets, because of their concentration to Flash and JavaScript. Java Applets are still way better then what you can do with JavaScript. For example, 3D with OpenGL, and it don't take 50% of my CPU like with JavaScript.

      Open source is one of the strongest points of Java. There are now 500,000 open source libraries* for Java and the best frameworks and libraries in Java are all open source. Hibernate, Spring, Apache Tomcat, Maven, Ant, etc.

      * http://mvnrepository.com/

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    78. Re:I don't want to be "that guy", however by RabidReindeer · · Score: 1

      I'm not sure that argument makes sense, using Java + Spring isn't going to leave your code any less vulnerable to maintenance and and scope issues anymore than using C# and the core .NET framework would.

      In fact, using a 3rd party framework like Spring will greatly improve maintainability because it provides methods that make far more sense than some of the standard Java library ones for common tasks, so you can right much more maintainable code, and you don't have to go out of scope writing fairly common things that aren't in the Java standard library, but are in Spring and similar.

      Actually, I dropped the Microsoft native platform years ago because they were making radical API changes on almost a weekly basis, swapping in and out entire API sets.

      Functional completeness is important, but having a set of stable functions is even more important.

      On the subject of Spring, one of the major advantage of that particular system is that it's based on Inversion of Control. Instead of components reaching out to each other, the components are (ideally) Plain Old Java Objects, and the inter-dependencies are handled by Spring's external wiring mechanism. Done well, this allows both free swapin/swapout of components (as long as their external interfaces are compatible) and components that are easier to re-use in other systems. With a side bonus of typically being easier to test as isolated units.

    79. Re:I don't want to be "that guy", however by K.+S.+Kyosuke · · Score: 1

      What I have found is that C# has some powerful features that other languages do not have.

      That's an extremely bold claim. What powerful feature does C# have that no other language has?

      --
      Ezekiel 23:20
    80. Re:I don't want to be "that guy", however by K.+S.+Kyosuke · · Score: 3, Funny

      In .NET, everything is an object.

      Unless it isn't, of course.

      --
      Ezekiel 23:20
    81. Re:I don't want to be "that guy", however by Gr8Apes · · Score: 1

      Microsoft has had the benefit of being the single controller of the .NET framework whilst Java has been victim of design by committee a lot of the time. This is why the .NET framework has managed to stay tidier and more focussed, but as I said in my other post what does it matter, because who the fuck sticks to just the core framework anyway when there are things like Spring out there?

      Spring.... Possibly the single fastest way to completely destroy compile time checks that exists for no benefit and make finding that 2 minute bug take all day. It effectively removes most of the benefits of a smart IDE, even with the SpringSource plugin. Got 100 autowired beans, now which one was injected into page 6 of a view set by controller 23 that extends controller 12? (numbers used to hide the guilty). By gosh there's no way to tell without running a debugger and double checking that you actually got the right one, because Joe added a new bean that happens to have the same base name, and that's why everything is crap now, 12 hours later. In Joe's defense, he's working on a component that goes across multiple applications so he's not familiar with what's going on in those apps, nor can he be with a million lines of code or more.

      That's just one anecdote in a long long long list of Spring fueled errors over the years. I've yet to see where Spring doesn't unnecessarily complicate code, add in extra layers, and remove compile time checks and the ability to step through the code in a deterministic manner. In the end, the best solution is just not to use it.

      --
      The cesspool just got a check and balance.
    82. Re:I don't want to be "that guy", however by gbjbaanb · · Score: 1

      true, but MS had made plenty of mistakes with C#.

      Look at Chris Brumme's excellent blog posts about what they did to make the CLR work the way it does. Questions like "why did we host the CLR in SQL Server and IIS like that", "why did we allow AppDomains to be such a security risk", "why are exceptions so slow" and a million other nuggets of insight into why writing a system like .NET was so difficult (hint: its mostly about interacting with the rest of MS ecosystem).

      Its awesome what he did, and fortunately he's a techie type who gives it to us straight.

    83. Re:I don't want to be "that guy", however by RaceProUK · · Score: 1

      There's always the Base Class Library, which is standardised by ECMA 335 and ISO/IEC 23271:2006. AFAIK, both MS's .NET and Mono are fully conformant to the BCL, so there is an element of portability.

      --
      No colour or religion ever stopped the bullet from a gun
    84. Re:I don't want to be "that guy", however by gbjbaanb · · Score: 1

      One of the reasons C# was faster than Java was its use of primitive types. These are obviously not Object-based.

      obviously this gives rise to other problems - such as boxing.

      What I find surprising is that these languages have people using them that have simply bought into the hype written by some marketing guy rather than look at what they are really using.

    85. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Have you only worked for one employer your entire career, or were you poached by another employer at some point?

    86. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Do you know of a better tool to do actual native apps on multiple mobile platforms?

    87. Re:I don't want to be "that guy", however by cavreader · · Score: 1

      First you need to quantify what you mean when you say something is "arguably better supported". Both the Java and .NET frameworks have been around for a while and both have robust developer communities from which to draw help and support

    88. Re:I don't want to be "that guy", however by Xest · · Score: 1

      More people actively maintaining it is what I was referring to.

    89. Re:I don't want to be "that guy", however by Xest · · Score: 1

      It sounds like you're complaining about certain usage of certain aspects of Spring rather than Spring's libraries in general.

      Sure you can create a clusterfuck with it, you can with any language and framework. Doesn't change the fact that it's one of the most succesfully used and appreciated Java frameworks by millions of other people though. It's succesful and popular for a reason, because plenty of people find it the best option.

    90. Re:I don't want to be "that guy", however by Xest · · Score: 1

      Microsoft have a habit of that depending on what you're doing. I'm unamused by their graphics APIs over the years - GDI, GDI+, DirectDraw, Direct2D, Direct3D, WPF's rendering controls, XNA, Managed DirectX, WinRT's drawing functionality.

      It just gets silly, apart from Direct3D the shelf life of a Microsoft rendering API seems to be about 2 minutes and it's just not worth investing in them anymore, best to just use OpenGL.

      But despite that other Windows technologies and related APIs have had a decent shelf life, most people are unaware that MFC to this day is still well supported - it got the new ribbon controls etc. before WPF or anything else did for example so it's probably going on what, the best part of 20 years old now and still going strong.

      ASP.NET MVC is a particularly nice framework and it's learnt some of the better lessons of Spring like good IoC support, whilst replacing it's sometimes over the top configuration with convention over configuration, so I really quite like it, it's such a pleasure to work with.

      It's really hit an miss in the Microsoft world, but I suspect that's more to do with the ethos of different teams - the folks behind MFC seem happy to plod along maintaining without causing any drama, but whoever is responsible for graphics API strategy I can only imagine is a schizophrenic with severe ADHD who can't stay focussed on the same thing for more than 5 minutes without changing his mind or contradicting himself.

    91. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Weird, because it seems to run fine on Android. Maybe that's just me?

    92. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Once someone starts using words like "syntactically elegant", run like hell. Dude you sound like a BS professor who can't write real code other than the auto generated stuff, just sayin.

    93. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      In .NET, everything is an object.

      Actually, it's even better than that. In .NET, everything CAN BE an object, but not everything HAS TO BE. An Int32 is just a 32-bit value with no System.Object overhead until you need to treat it as an object, .NET will automagically "box" the integer value, to allow things like 17.ToString(). Meanwhile, common things like a+b/c don't incur any object overhead.

    94. Re: I don't want to be "that guy", however by cablepokerface · · Score: 1

      It' really the same thing with C#. I can't really remember the last serious project where I didn't need one or more NuGet packages (nuget is the main way to included and update third party packages in visual studio). Some are great, some not so much. But there is one for nearly every situation. Don't think the .net framework includes that much more in the core than java does, in my opinion it's a tad richer, but not by much.

    95. Re:I don't want to be "that guy", however by dhasenan · · Score: 1

      Hey! Java is only six or eight years behind C# these days.

    96. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      Check out Unity3d.com Android, Apple iOS products, Windows phone, native x86, in web browsers etc...

    97. Re:I don't want to be "that guy", however by Synerg1y · · Score: 1

      How is boxing a problem?

    98. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      T .Net. The laziest environment for the laziest programmers. Why stand on the shoulders of giants, when you can just string a hammock between a couple of them and sleep for a while?

      And this describes ALL of my frustrations with .NET programmers. I'm sure there are decent ones out there, but I swear every time I deal with a dev who deals solely in .NET/Microsoft technologies, they do the laziest, horrriblest, most impossible to maintain or run well code. Shit like polling a table in a database in a loop and sucking it into another database instead of using the API to pass objects. Code that doesn't run well no matter how much hardware I throw at it. Undocumented, poorly understood even by the development team, flaming turds, all of it. Single-threaded crap coded in a mixture of Access macros,c#, VB.NET and God only knows what else.

      I'm not even a bloody developer. I had a couple Java classes in college. If I can tell you a deep architectural issue with your code, you're DOING IT WRONG. If you have to think for an hour before coding, do that, don't just go "well, I can poll in a loop and then mangle all the data around by parsing it as text strings in about 5 lines" READ THE FRIGGING DOCUMENTATION.

    99. Re:I don't want to be "that guy", however by RightSaidFred99 · · Score: 1

      Yeah, I too develop with both for my job and the Java vs. C# is pretty much over - C# is better in most ways. It's a bit like the AMD vs. Intel wars. Intel won..in most ways. There are still some cases where Java is better, for example cross-platform support is obviously superior.

      But feature-wise C# is a clear winner, and it's even getting much better in its traditional weak spot which is third-party open source library support. Nuget is a worthy analog of Maven. Frankly I feel like I'm slumming when I use Java these days.

    100. Re:I don't want to be "that guy", however by RightSaidFred99 · · Score: 1

      .NET has Enterprise Library/Unity and Spring.NET and various other choices. .NET's collection library is fine IME, never thought "gee, wish this was better". Nuget is a worthy Maven-like tool for dependency management, and MSBuild is certainly powerful for build management. J2EE...a...plus?

      The only advantage I see to Java is the million libraries (though .NET is getting much better in this space with Nuget), and of course portability.

      I'd only willingly use Java if an employers was cheap, not a Windows shop, or had some other odd reason to force Java use. I do actually have to use Java at work for a UNIX CLI tool that talks to a Windows web service I won using Kerberos authentication. I like it fine but .NET/C# spoils me.

    101. Re:I don't want to be "that guy", however by RightSaidFred99 · · Score: 1

      Nuget is pretty cool. Not as mature as Maven and not build-focused, only dependency focused but it provides the same basic features when combined with MSBuild.

    102. Re:I don't want to be "that guy", however by TheSkepticalOptimist · · Score: 1

      Yes, I had to agree that the early days of .Net was a nightmare, but there was a reason for this to move towards a uniform API. .Net 4.0+ is probably one of the most well conceived and uniform API's I have ever used. Its not perfect, but its more perfect then Java or other platforms. Today avoiding Microsoft API is ill conceived and you will find that you can do so much more so much more efficiently going back to .Net, especially since Visual Studio has also matured and implemented unit testing and other automated testing features that go hand in hand with the API.

      Java and C# are neck in neck today only because Java had to catch up to C# which I find develops and improves faster. While C# may have been a blatant rip off of Java in the beginning, it evolved faster and started integrating parallelism and lambda expression long before Java did.

      The problem I have with Java today is its reputation. I personally have nuked Java runtime off of any computer I use. I just do not see a point to run another runtime to write and use a Windows application, especially when it introduces its own security holes and updates weekly. While Java "the language" is great for web development especially when doing Android stuff, Java "the runtime environment" is a POS that needs to be terminated.

      --
      I haven't thought of anything clever to put here, but then again most of you haven't either.
    103. Re:I don't want to be "that guy", however by howe.chris · · Score: 1

      So which one would I pick? well, it depends on the project, the platform, and the amount of code I can reuse from open source libraries.

      What is wrong with you? You have to choose you insensitive clod, we are on Slashdot! I bet you have both Apple and Windows machines in your house!! Maybe even something that has "Linux" on it. Quick! PS3, XBox, or Wii? ... What do you mean "for which game or what service?" You can't be sensible on Slashdot.

    104. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      If no one uses it. call it a standard all you want - it isnt. Conversely, if everyone uses it, even if no one calls it a standard, it is.

    105. Re:I don't want to be "that guy", however by shutdown+-p+now · · Score: 1

      This is completely irrelevant in this case. C# - the language - does have a standard. I haven't heard anyone complaining about how it's "not really a standard", like people were going about OOXML - and hell, there's at least one alternative implementation of the published standard in this case, which manages to fully cover it just fine.

    106. Re:I don't want to be "that guy", however by shutdown+-p+now · · Score: 1

      Then Microsoft asked "wouldn't this be better if it didn't suck?" So they worked on it. They "improved" on it. Thus was born the Windows-only J++ language. It was Java, only with extra stuff to make it work more Windows-y. Around the same time, Microsoft started considering the possibility of making the JRE also not suck. To that end, they hired Anders Hejlsberg and let him loose in the managed runtime labs to play with (torture?) JRE and VBRUN (oh, yes, we all remember VBRUN##).

      J++ did indeed have additional language features, but they were not particularly "Windows-y". The only prominent thing that I can remember was the addition of delegates (basically, nominal function types) to the language.

      What made J++ "Windows-y" was all the various extensions to the Java standard library that it had - in particular, Windows Foundation Classes. This was a UI library that wrapped native OS widgets (unlike Swing), but which wasn't platform-independent (unlike AWT) - it was very clearly and specifically about Win32. All in all, it looked a lot like someone took Delphi's VCL (which back then was by far the most popular RAD UI framework on Windows), and ported it to Java. It was also very similar to how VB did UI, although more powerful. As a result, you could write apps in it that didn't look and feel slow or alien to the platform, and a lot of people already had VB or Delphi skills that they could start using with J++. Swing, in contrast, had a much steeper learning curve, and visually apps using it were an eyesore to the users, not to mention all the UI lag.

      The story with MS JVM is a bit different. Basically, when it came out, Sun was still struggling with performance of their own VM (they caught up with HotSpot maturing later on, and now they're actually faster than .NET in many cases, but it was too late by then on the desktop), and it turned out that MS JVM was considerably faster back then - and because of that, most people who ran Windows (i.e. most everyone on the desktop) used it to run Java stuff. Which, in turn, meant that developers were more likely to pick up and use MS-specific features (like delegates or WFC), knowing that, standard or not, most of their userbase have them already. That's what got Sun all riled up - they were facing a very real possibility of Java being hijacked from them altogether. Officially, they specifically sued because both MS JVM and J++ were advertised as "Java", and that's a Sun trademark, the license to use which comes with a lot of strings attached - including a requirement to conform to various specs and to not extend the language and the library willy-nilly.

      When Sun sued and won, J++ was officially scrapped, but in practice a lot of that work was revived under .NET umbrella. If you compare Windows Forms and WCF APIs, for example, there are a lot of similarities there. Delegates because a prominent language feature in C#, practically as-is. And, of course, C# 1.0 itself was a lot like Java cross-bred with Delphi (properties, explicit virtual etc).

      Fast forward a few years. Java is at 1.4, and everyone wants generics. That same year, .Net 2.0 has generics. Java caught up within a few months

      Your ordering is wrong here. Java got generics in 1.5 (aka 5.0), which was released in 2004. .NET (and C# & VB) got generics in 2.0, which was released in 2005. So Java was actually first to the market here, but their implementation of generics was inferior in many ways, and especially in performance (unboxing primitives every time you iterate over a collection is insanely expensive).

      What .NET 2.0 added that Java didn't have, and still doesn't have, is anonymous delegates - which is just a fancy way to say "function literals and c

    107. Re:I don't want to be "that guy", however by shutdown+-p+now · · Score: 1

      You forgot Java's more theoretical advantages, which facilitate formal verification and allow for some pretty nifty JIT.

      For example? The only thing that I can think as even remotely relevant here are checked exceptions, but this is the first time I've heard anyone claim that they allow for better JIT output, so I assume that you meant something else?

    108. Re:I don't want to be "that guy", however by shutdown+-p+now · · Score: 1

      Except MS reallocated most of the Iron* and DLR devs to other projects, letting them fester...

      Have you looked at some of those other projects, however?

      IronPython itself is still alive and well, by the way, it's just not an MS project anymore.

      I lost my interest when the killed Managed JScript, or whatever the DLR JScript runtime was called.

      There was no such thing as a "DLR JScript runtime". There was JScript.NET, which is a compiler for JScript that output .NET IL. That was there since .NET 1.0, long before DLR, and it was not updated for DLR when that appeared.

    109. Re:I don't want to be "that guy", however by shutdown+-p+now · · Score: 1

      Not really sure what LINQ is exactly, but it sounds a bit like SQL embedded within a language. Couldn't you do the same thing with a library call? What about Perl being able to query and filter data that it has?

      LINQ is a lot of different things that combine together. Let me try to go point by point.

      The first piece is what other languages call list or sequence comprehensions. If you ever wrote something like:

      [x*2 for x in range(10) if x % 2 == 0]

      in Python, you've used that. LINQ uses a less concise syntax that is more reminiscent to SQL for the same thing - e.g. the example above would be:

      from x in Enumerable.Range(0, 10) where x % 2 == 0 select x*2

      in C#, but semantics are the same. That syntax is actually just syntactic sugar for a bunch of method calls with lambdas, with keywords mapped to methods with the same name - the expression above, for example, is translated to:

      Enumerable.Range(0, 10).Where(x => x % 2 == 0).Select(x => x*2)

      And Where and Select can be pretty much anything - e.g. the return type of Where doesn't matter, so long as it has a method called Select on it. Standard collection types provide implementations that do what you'd expect them to do (not directly, but rather via a mechanism called "extension methods", which allows you to add members to existing types - but this doesn't really matter to the developer using this API).

      The second part are lambdas themselves. When you see x => x % 2 == 0, this has pretty much the same meaning as arrow-based lambda syntax in other languages using it (like Scala), with type of x inferred from the context in which it is used. However, there's a twist: instead of compiling this to a function and passing a reference to that, there's also an option of implicitly "quoting" lambda expressions as ASTs. Simply put, if the function you are passing the lambda to as a parameter declares the type of that parameter as Expression, then that function gets the AST for the lambda body, instead of compiled code.

      This allows the function to interpret that AST in different ways at runtime instead of just compiling and running it (though that remains an option). For example, in LINQ to SQL and Entity Framework, the AST is converted to SQL, and passed on to the server. In general, the idea is that you have various LINQ providers (i.e. implementations of Where, Select etc) accepting ASTs and converting them to whatever query language is used by the backend that you're extracting the data from. Thus, you have a single uniform syntax for queries, that is also strongly typed (can also be weakly typed since "dynamic" was introduced in C# 4.0), but which can be handled in different ways depending on what data you're querying.

    110. Re:I don't want to be "that guy", however by shutdown+-p+now · · Score: 2

      Async is (or was) a pretty standard feature in some languages and run time systems and operating systems. Usually it's just a library or operating system you can use, but ya, that's not integrated into the language itself. But consider Ada with asynchronous transfer of control. Erlang has asynchronous stuff, but maybe that looks too much like message passing. Certainly Smalltalk allowed you to have blocks executed asynchronously. Though it all depends upon what your definitions are, it's too easy to say that it's just boring old message passing and it's not really in the language unless there's some special syntax for it.

      Async in the context of C# usually refers to async/await. If you're familiar with PL concepts, the concise way to describe it is that it takes a sequential algorithm, and rewrites it in continuation-passing style for you, with continuation boundaries explicitly determined by where you put 'await" in your code. E.g. consider this:

      s = file.ReadLine();
      Console.WriteLine(s);
      s = file.ReadLine();
      Console.WriteLine(s);

      This code is just reading two lines synchronously, blocking the thread between two reads waiting on I/O to complete. If you wanted to avoid blocking the thread, you can write that with a chain of callbacks, much like what you see in Node.js etc:

      file.ReadLineAsync().ContinueWith(t1 =>
        Console.WriteLine(t1.Result)
      ).ContinueWith(t2 =>
        Console.WriteLine(t2.Result)
      );

      This works, but it gets tedious when you have long chains, and even more tedious when you have nested chains. Worse yet, rewriting loops in this manner is not trivial. For example, simple synchronous code like this:

      while ((s = file.ReadLine()) != null) {
        Console.WriteLine(s);
      }

      becomes this mess if redone async callback style:

      Action<Task<string>> body = t => {
        string s = t.Result;
        if (s != null) {
          Console.WriteLine(t.Result);
          file.ReadLineAsync().ContinueWith(body);
        }
      };
      file.ReadLineAsync().ContinueWith(body);

      On the other hand, with async/await, the first example becomes:

      s = await file.ReadLineAsync();
      Console.WriteLine(s);
      s = await file.ReadLineAsync();
      Console.WriteLine(s);

      and the second one is:

      while ((s = await file.ReadLineAsync()) != null) {
        Console.WriteLine(s);
      }

      Note how the only difference between async and sync code here is the addition of "await", and the use of ReadLineAsync instead of ReadLine. Compiler transforms all that to code with callbacks, automatically inserting one in every place where "await" is used (and rewriting loops etc as needed).

      Really, all of this is just coroutines married to futures. In some other languages, you can take existing coroutine support and implement futures as a library (e.g. in Python, where "yield" becomes the equivalent of "await").

    111. Re:I don't want to be "that guy", however by shutdown+-p+now · · Score: 1

      I just wrote two comments that try to get into more detail on both LINQ and async.They might come in handy if you don't want to re-word all that yourself over and over again ~

    112. Re:I don't want to be "that guy", however by Anonymous Coward · · Score: 0

      You mean like Unity or the Sims3? How about Bastion? It seems you missed your wake-up call.

    113. Re:I don't want to be "that guy", however by Gr8Apes · · Score: 1

      Actually, I'm complaining about the fundamental approach of Spring, which breaks compile time checking, and liberally utilizes dynamic proxies. All of this complicates code, and I don't find that it improves development over actually designing and using straight JDK features. It obfuscates and unnecessarily abstracts everything it touches, and I've yet to see one case where it actually solved a problem. I stated years ago that Spring was a solution looking for a problem. That is still true.

      --
      The cesspool just got a check and balance.
    114. Re:I don't want to be "that guy", however by ahabswhale · · Score: 1

      No, Java security is only an issue for the browser plugin. These broad statements about how the runtime environment is a POS are flat out false. I also challenge you to run your .Net 4 app on linux or OSX with support from Microsoft. This is something the Java runtime has been able to do from the beginning.

      --
      Are agnostics skeptical of unicorns too?
    115. Re:I don't want to be "that guy", however by ahabswhale · · Score: 1

      When did C# get faster than Java? That's news to me. Last I checked, Java was ranked 3rd behind C and C++.

      --
      Are agnostics skeptical of unicorns too?
    116. Re:I don't want to be "that guy", however by hobarrera · · Score: 1

      It's publicly documented, but it's not "standard".
      Standard means that it works the same way on most implementations (like HTTP or IMAP).
      That doesn't apply here, there's just a single complete implementation.

    117. Re:I don't want to be "that guy", however by gbjbaanb · · Score: 1

      according to this guy's results, it should now be 4th behind C, C++ and node.js

      but I guess it depends on the work you're doing. I'd say C# and Java are exactly comparable in terms of performance and memory bloat as they're roughly the same thing.

    118. Re:I don't want to be "that guy", however by iluvcapra · · Score: 1

      IMHO the browser developers sunk Java Applets, because of their concentration to Flash and JavaScript.

      It remains, they are sunk, regardless of who sunk them.

      --
      Don't blame me, I voted for Baltar.
    119. Re:I don't want to be "that guy", however by devent · · Score: 1

      I can agree with that. Java Applets are sunk just like Silverlight and hopefully Flash.

      I just wanted that Java Applets are sunk for the right reasons. And JavaScript is not the right reason.
      Java developers are still using them because they are good. Like my example. You can either embed the application in the web browser or you can do a web start (the app is downloaded and started).

      Now Silverlight and Flash are sunk because of the right reasons. Because they are proprietary closed source code and something like that should have nothing to do with the open Web.

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    120. Re:I don't want to be "that guy", however by Synerg1y · · Score: 1
    121. Re:I don't want to be "that guy", however by Synerg1y · · Score: 1

      My main point is that using the 3rd party framework means you have to hire a maintainer w that skillset, typically for more $ than a core Java developer. I agree that the reason anybody uses it is because it improves the Java framework, however I've worked a bunch with various 3rd party frameworks and most owners of those applications aren't appreciative of them in the long run due to maintenance costs and sometimes even difficulty of making changes.

    122. Re:I don't want to be "that guy", however by ahabswhale · · Score: 1

      Cute but not supported by Microsoft.

      --
      Are agnostics skeptical of unicorns too?
    123. Re:I don't want to be "that guy", however by Synerg1y · · Score: 1

      why do you need MS support for an app written inhouse in .NET FW 4.0?

      What are you gonna ask, how to code it?

      I think the more important thing is that it CAN run nowadays. How often this is used is another story.

      Also, who supports Java? :)

    124. Re:I don't want to be "that guy", however by ahabswhale · · Score: 1

      Because if it's officially supported by MSoft, then I have confidence about coding a solution that will run on multiple platforms. If it's random dudes on the internet, they can just lose interest and I would have to be a moron to make a business decision based on that. It also means that Microsoft would be considering Linux in their design decisions.

      And Oracle supports Java. Don't play cute. You many not like Oracle (and I sure don't) but they do support the product. I have zero concerns about Java being multi-platform. I cannot say the same thing about .Net.

      --
      Are agnostics skeptical of unicorns too?
    125. Re:I don't want to be "that guy", however by Synerg1y · · Score: 1

      You're right, there is no guarantee. If only we could make our applications accessible via the web, so a user could access them using only their browser... oh wait. Now if only all of those browsers followed standards...

    126. Re:I don't want to be "that guy", however by Xest · · Score: 1

      I guess you just don't unit test otherwise it would all make sense.

      It definitely helps you write better more maintainable software if you're doing anything non trivial and have a proper unit testing regime.

    127. Re:I don't want to be "that guy", however by ahabswhale · · Score: 1

      Sorry but you'd have to be an idiot to run production web servers on a .Net whine installation.

      --
      Are agnostics skeptical of unicorns too?
    128. Re:I don't want to be "that guy", however by Synerg1y · · Score: 1

      Not only an idiot, but its flat out impossible, as .NET requires IIS. My point is the platform limitations you've mentioned have been superseded by web applications a long time ago.

      While throwing idiot around, I'd also like to mention that only idiot clients run mixed environments requiring multi-platform applications. No need to put lipstick on a pig.

    129. Re:I don't want to be "that guy", however by ahabswhale · · Score: 1

      So at the end of all of this, you have no fucking point to make whatsoever.

      --
      Are agnostics skeptical of unicorns too?
  3. Eat sum open source W2K by Anonymous Coward · · Score: 0

    Try download that

  4. Re:first by Anonymous Coward · · Score: 2, Funny

    Damn my Java client!

  5. As much as I like Java... by MrEricSir · · Score: 1

    As much as I like Java, there's a few obvious features that it's somehow still missing:

    • Signals/slots
    • Async methods
    • Properties

    C# has all of these, of course.

    --
    There's no -1 for "I don't get it."
    1. Re:As much as I like Java... by Anonymous Coward · · Score: 0

      I wish C# had exception declarations or someone made a stable tool that would tell me what exceptions to expect.
      And don't say ILDASM or a decompiler :P

    2. Re:As much as I like Java... by Anonymous Coward · · Score: 0

      I disagree that stuff like "Async methods" and "Signals/slots" should be in the language. This is more something for an API. Java has a great API for stuff like that in java.util.concurrent. AFAIK in .net those are just macro's expanded by the preprocessor.

    3. Re:As much as I like Java... by Anonymous Coward · · Score: 0

      It's 2013, even C++ has std::async. If you want to stay in the 70's there's still vanilla C compilers out there.

    4. Re:As much as I like Java... by stenvar · · Score: 0

      There's more missing in Java:

      multidimensional arrays
      unsafe modules
      easy interfaces to native code

      Java also has some serious design errors, like its array types, its parameterized types, its exception system, and its strings.

    5. Re:As much as I like Java... by Anonymous Coward · · Score: 0

      There is no such tool because it can't be done. The set of exceptions that can be thrown is a dynamic property of the code, it simply can't be determined at compile time. Java's exception declarations simply force people to add useless workaround to a useless restriction.

    6. Re:As much as I like Java... by Mitchell314 · · Score: 1

      Huh? I thought java did have multidimensional arrays.

      --
      I read TFA and all I got was this lousy cookie
    7. Re:As much as I like Java... by Anonymous Coward · · Score: 0

      If my memory doesn't fail me, there is a slight difference. Java has "array of arrays" whilst C# supports both.

      Java:

      int [][] array_of_arrays; // you have to initialize the outer array first, then each of the sub arrays later

      C#

      int [,] multi_dimensional = new int [3, 4]; // 3 rows, 4 columns multidimensional array

      of course, the Java way is also supported in C#

    8. Re:As much as I like Java... by naoursla · · Score: 1

      Out parameters -- my favorite feature of C# over Java.

    9. Re:As much as I like Java... by Anonymous Coward · · Score: 0

      Java:
      int [][] array = new int[3][4];
      Seems to work fine.

    10. Re:As much as I like Java... by Anonymous Coward · · Score: 0

      Huh? I thought java did have multidimensional arrays.

      It does.

      I think the GP was referring to easily accessing multi-dimensional arrays using a single offset, instead of splitting them into individual indices. This is possible in C/C++ because of pointers. I assume it's also possible in C#, if you use unsafe code.

    11. Re:As much as I like Java... by benjymouse · · Score: 1, Informative

      Huh? I thought java did have multidimensional arrays.

      No, Java allows you to declare arrays of arrays - also called "jagged" arrays because not every "sub-array" need to have the same length (you can assign different arrays after initialization). Arrys of arrays are not multidimensional arrays, however.

      C# allow you to declare both "jagged" arrays of arrays as well as true multidimensional arrays.

      In some (limited) situations the true multidimensional arrays will slightly outperform jagged arrays. This happens if you mostly access random cells of the array. In that case the true multidimensional array will only require a integer multiplication and an array indirection. Jagged arrays will always require two array indirection accesses.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    12. Re:As much as I like Java... by Anonymous Coward · · Score: 0

      Okay, it is an external library so it doesn't quite count, but BridJ is probably about as easy to use as P/Invoke.

    13. Re:As much as I like Java... by Anonymous Coward · · Score: 1

      If you're using reflection to find and throw an exception you have other problems.

    14. Re:As much as I like Java... by ILongForDarkness · · Score: 1

      Or Iff in VB. That is the beauty of .Net built in support for a variety of languages. I've had at times used C# FOSS controls in VB projects and vs versa. You're knowledge of the platform transfers ridiculously quickly. We still don't get cross language projects but it is just a matter of picking the pieces to put in which libraries well and a old VB hack can work alongside someone using C# or whatever.

    15. Re:As much as I like Java... by cbhacking · · Score: 1

      Comments aren't good enough? If some code is going to throw exceptions on a ragular basis and these exceptions aren't documented, that's not code I want to be using.

      On the flip side, it pisses me off to need to write try-ignore wrappers around code that I know will never throw the exception in question.

      --
      There's no place I could be, since I've found Serenity...
    16. Re:As much as I like Java... by cbhacking · · Score: 1

      Distint signed and unsigned variants of all integer types (handy for interop with native code, and occasionally for other things), "using" blocks (forces an object to be cleaned up when it goes out of scope, instead of whenever the garbage collector gets around to noticing that it's out of scope), destructors (no, Java finalize() does *not* count), lambdas (and delegates in general; the closest thing Java has to a simple function pointer is ridiculously verbose), LINQ or anything like it, better generics that let you do things like allocating an array of the generic type without absurd reflection hacks...

      As a language, C# is just much, much better.

      --
      There's no place I could be, since I've found Serenity...
    17. Re:As much as I like Java... by stenvar · · Score: 1

      Also forgot operator overloading.

      Yeah, C# is a much better language. Too bad it got killed on FOSS platforms by FUD from Java activists, and ironic that it turned out to be Java that was full of legal traps and bad faith claims of openness.

    18. Re:As much as I like Java... by behrooz0az · · Score: 1

      Java uses less memory for initialization and less cpu when accessing elements. I prefer that over a few more keystrokes.

      --
      Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion. -- Spazmania (174582)
    19. Re:As much as I like Java... by Anonymous Coward · · Score: 0

      That's an API, not a language feature. You're showing the GP an example of what he's proposing, and then pretending he's stuck in some other era.

  6. What did you expect? by medv4380 · · Score: 2

    C# was the direct result of MS being blocked from using Java, and was their J# product re-branded into .net. The core is nearly identical with the exception that C# has access to things like DirectX, and a few other nice to have APIs from MS

    1. Re:What did you expect? by mwvdlee · · Score: 1

      How exactly was MS blocked from using Java?
      Or do you mean their attempt at embrace, extend and extinguish known as J++?

      FWIW, I like both languages, but they have entirely different markets. Windows-only? C#. Multi-platform? Java (Mono is no full C# .NET substitute).

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    2. Re:What did you expect? by bmo · · Score: 4, Informative

      C# was the direct result of MS being blocked from using Java,

      No, no it wasn't.

      It was that Sun owned the standard and told Microsoft to quit violating the standard or call it something else.

      Sun sued and won in court, because they were right.

      If the situation was reversed, I'm sure you'd be saying Microsoft was in the right for defending C#.

      Microsoft was always free to use Java and write their own version, as long as it conformed to the standard. But Microsoft being Microsoft, "standards are for pussies."

      --
      BMO

    3. Re:What did you expect? by naoursla · · Score: 1

      > How exactly was MS blocked from using Java?

      By court order, IIRC.

    4. Re:What did you expect? by bmo · · Score: 5, Informative

      No, they weren't blocked from using Java.

      They were blocked from creating their own non-standard Java.

      Because Sun owned the trademark and the standard. Now owned by Evil Larry.

      You can create your own language and API, but you can't call it Java if it doesn't meet the standard. How difficult is this to understand?

      Poor persecuted Microsoft.

      --
      BMO

    5. Re:What did you expect? by aztracker1 · · Score: 1

      MS's extensions were to make it easier to access system code without having to go through the typical hurdles you do in Java (JNI is a little bitch). That said it was a violation of the Java specification. When MS created C#, as a language there were specific ties to support "unsafe" execution (direct access to pointers, and lower-level system structures), as well as C-style library interfaces via easy [DllImport] declarations and via direct PInvoke statements. IMHO this is the single biggest advantage that C# has over Java, even cross-platform with Mono. It's very easy to utilize different libraries in a cross-platform way in C#, far more easily than it is in Java.

      That's not the only advantage that C# has over Java. I would say that it's better curated as a language, that's mainly a result of a benevolent dictator (Anders) than a knock against Java (extended by committee). Personally, I find working on Java based projects *far* more frustrating than .Net... though in both cases, I tend to see far too much "Enterprise" practices for the sake of.

      --
      Michael J. Ryan - tracker1.info
    6. Re:What did you expect? by jrumney · · Score: 2

      MS's extensions were to make it easier to write code that only ran on Windows.

    7. Re:What did you expect? by Nerdfest · · Score: 1

      Bingo. This is generally known as 'extend'.

    8. Re:What did you expect? by naoursla · · Score: 1

      You are right. They settled the 1997 lawsuit in 2001 and as part of that agreed not to distribution Java anymore. It wasn't a court order, but it was a legally binding agreement of some sort.

      http://www.javaworld.com/javaworld/jw-01-2001/jw-0124-iw-mssuncourt.html

      When I worked at Microsoft there was talk about how they were legally prevented from shipping anything "Java". I'm actually surprised they are shipping BluRay in the XBox One since the BlueRay spec has Java in it.

    9. Re:What did you expect? by mwvdlee · · Score: 1

      Have you even read the link you posted?

      Microsoft can continue to ship existing products that use Sun's technology -- based on the outdated Java version 1.1.4 -- as well as those currently in beta, for a period of 7 years. However, all future versions of those products must pass Sun's Java compatibility tests, Sun said in a separate statement. In return, Microsoft has agreed to pay Sun 0 million.

      Microsoft has also agreed not to use Sun's Java compatibility trademark -- represented by a steaming coffee cup logo -- something that Microsoft was barred from doing by a 1998 court order imposed during the long-running dispute. Sun said the agreement would "protect the future integrity" of its Java technology.

      All it basically says is exactly what bmo and I said; they can continue using and distributing Java as long as they don't try any embrace, extend and extinguish tactics. They weren't legally prevented from shipping Java at all, they were prevented from shipping an incompatible version and calling it "Java". Heck, they weren't even prevented from shipping their incompatible Java-based language, they just couldn't misappropriate the name and called it "J++".

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    10. Re:What did you expect? by spongman · · Score: 1

      The irony is that the ms java vm passed all sun's compatibility tests except for the JNI ones (which are platform-dependent anyway) and it did so significantly better than sun's sorry attempt. Sun's original awt implementation on win32 was a joke.

    11. Re:What did you expect? by angel'o'sphere · · Score: 1

      JNI is *NOT* platform dependent. That is exactly the point of it.

      Sun's original awt implementation on win32 was a joke
      No it was not, it only showed how ridiculous the windows API at that time was, as AWT was nothing more than a wrapper to it, and intended only to be a wrapper around it, nothing more.

      Then came Swing, and then finally MS got it and crafted something like Windows.Forms.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    12. Re:What did you expect? by shutdown+-p+now · · Score: 1

      You can create your own language and API, but you can't call it Java if it doesn't meet the standard. How difficult is this to understand?

      Apparently it is, since this is exactly what GP said happened. The "can't call it Java" thingy that ended up being released is .NET.

    13. Re:What did you expect? by shutdown+-p+now · · Score: 1

      JNI is *NOT* platform dependent. That is exactly the point of it.

      JNI is a platform-independent framework to access platform-specific native APIs. So same end result.

      No it was not, it only showed how ridiculous the windows API at that time was, as AWT was nothing more than a wrapper to it, and intended only to be a wrapper around it, nothing more.

      If AWT was "nothing more than a wrapper around Windows API", then how exactly did it work on Solaris and Linux.

      Thing is, AWT was a wrapper over the lowest common denominator of Win32 and Motif. That it sucked was inevitable by design.

      Then came Swing, and then finally MS got it and crafted something like Windows.Forms.

      If you look at Windows Forms, it's essentially WFC (the Win32-specific UI framework offered in J++ as a better alternative to AWT) developed further and rewritten in C#.

      And Swing? It still sucks today, but back then, in 1997 and even in 2001, it was a horribly bloated framework that had visible UI lag on all platforms. To add insult to injury, it also looked like crap on all those platforms.

    14. Re:What did you expect? by shutdown+-p+now · · Score: 1

      Some were, some weren't. E.g., how did delegates make it easier to "write code that only ran on Windows"?

    15. Re:What did you expect? by Anonymous Coward · · Score: 0

      Of course, MS has been trying to kill java from day one. That's why it build it's own jvm which gave bad user experience and fragmented java. Because java worked also for linux and others which are not in MS control and taxes. .NET (and SL) has the same purpose. They prevent competition in platforms. When you code with those, you work for MS-dictatorship.

    16. Re:What did you expect? by bmo · · Score: 1

      Don't know if you'll see this, but...

      Yes, you're exactly right. Look at what they've done with Kerberos and such. I said "standards are for pussies" and they've been doing that for decades. Another thing to look at is what they've done with the ISO with document standards. They deliberately tried to poison the well.

      There are so many examples to point at with regards to Microsoft's fight against standards.

      --
      BMO

    17. Re:What did you expect? by angel'o'sphere · · Score: 1

      JNI is a platform-independent framework to access platform-specific native APIs. So same end result.

      No it is not. It is an API to access *any* native code. Like *my own code* that I distribute together with my compiled Java program, like e.g. SWT.

      If AWT was "nothing more than a wrapper around Windows API", then how exactly did it work on Solaris and Linux.

      Thing is, AWT was a wrapper over the lowest common denominator of Win32 and Motif. That it sucked was inevitable by design.
      You are right, I should have been more clear regarding "common denominator". However that does not change much.

      And Swing? It still sucks today, but back then, in 1997 and even in 2001, it was a horribly bloated framework that had visible UI lag on all platforms. To add insult to injury, it also looked like crap on all those platforms.

      I disagree completely.
      To all points even.
      Neither was or is it bloated. Nor did it lag. On my old Win 95 PC it ran like a charm. No idea what kind of Hardware you used. Also I never saw any program that looked crap, but that might be a matter of taste, I mean, which native program does not look like crap? On windows nearly everything is horrible and linux is not much better IMHO.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  7. Critical Bugs by thewils · · Score: 2

    C# does not appear to have 40 Critical bug fixes every quarter like Java does either. The latest Java update has caused a _lot_ of business systems to crash.

    --
    Once I was a four stone apology. Now I am two separate gorillas.
    1. Re: Critical Bugs by Anonymous Coward · · Score: 0

      There are ciritical fixes released for the .net API every so often via windows update. Neither are flawless in that regard.

    2. Re: Critical Bugs by Rockoon · · Score: 1, Troll

      There are ciritical fixes released for the .net API every so often via windows update. Neither are flawless in that regard.

      It seems to me that Microsoft tries hard to make sure that updates to the framework dont break existing programs, whereas it doesnt seem like Oracle even makes an attempt.

      --
      "His name was James Damore."
    3. Re: Critical Bugs by benjymouse · · Score: 4, Informative

      There are ciritical fixes released for the .net API every so often via windows update. Neither are flawless in that regard.

      True, neither is flawless.

      But one of them appears to have been considerably better designed (or better QC):

      .NET 4: 34 vulnerabilities Released 2010-04

      Java 1.7: 216 vulnerabilities Released 2011-07

      or the previous incarnations:

      .NET 2: 53 vulnerabilities Released 2006-12

      Java 1.6: 432 vulnerabilities Released 2006-01

      Java experiences 6-8 times the number of vulnerabilities, even over shorter time frames.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    4. Re: Critical Bugs by stewsters · · Score: 0

      95% of those java bugs are for the browser plugin. Last time I checked, activeX didnt have a great track record either. They both find about the same amount of server issues. .Net just sells their extra vulnerabilities to the NSA rather than fixing them.

    5. Re:Critical Bugs by phantomfive · · Score: 1, Informative

      C# does not appear to have 40 Critical bug fixes every quarter like Java does either.

      Sure they do. The flaws aren't in the language (with Java or Silverlight), after all, if you're running a program on your local machine in either of those languages, they're designed to give you access to the filesystem, etc. the flaw in the idea of trying to run foreign code on a local sandbox. Good luck.

      --
      "First they came for the slanderers and i said nothing."
    6. Re:Critical Bugs by Eros · · Score: 1

      Oh they are there, it is MS so you can be sure of it. They just don't have a web browser accessible install base anywhere near the size of Java. But please go on believing the reason those bugs aren't surfacing is because they are not there.

    7. Re: Critical Bugs by PlastikMissle · · Score: 2

      But ActiveX isn't part of .NET and never was.

    8. Re: Critical Bugs by benjymouse · · Score: 3, Informative

      95% of those java bugs are for the browser plugin. Last time I checked, activeX didnt have a great track record either. They both find about the same amount of server issues. .Net just sells their extra vulnerabilities to the NSA rather than fixing them.

      No they are not. They are all over the runtime and library: Libraries, Hotspot, JavaFX, AWT (many), 2D, serialization, reflection, JAXP, RMI, beans, JAX-WS, etc etc. They are amplified by the fact that many of them are indeed in a library/feature that can be accessed through applets from remote. But the vast majority of the vulnerabilities exists isolated from the applet and could be exploited through other channels.

      ActiveX has nothing to do with .NET.

      And even so, there has been precious few vulnerabilities in ActiveX. The problem with ActiveX was that the model allowed foreign code to execute non-sandboxed on your machine, so that a bug in a control could have (and had) dire consequences. In that regard, ActiveX resembles SUID on *nix: You check at the gate and if the subject appears to have legitimate papers you let him in and assume that he'll be well-behaved. Just like with SUID where a bug in a SUID root tool may lead to system compromise, a bug in an ActiveX control could let the attacker run his own code with your credentials.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    9. Re:Critical Bugs by benjymouse · · Score: 2

      C# does not appear to have 40 Critical bug fixes every quarter like Java does either.

      Sure they do

      You need to do better than that. Try secunia:

      Silverlight 3: 2 vulnerabilities
      Silverlight 4: 7 vulnerabilities
      Silverlight 5: 4 vulnerabilities.

      Hardly the swiss cheese that is Java applets.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    10. Re: Critical Bugs by arglebargle_xiv · · Score: 1

      Java experiences 6-8 times the number of vulnerabilities, even over shorter time frames.

      Leading to a statement even more unique than "Hold the newsreaderâ(TM)s nose squarely, waiter, or friendly milk will countermand my trousers":

      If you want to be safe, go with Microsoft's product.

    11. Re: Critical Bugs by devent · · Score: 0

      What a BS. Only because you have more bugs _reported_ you now call one system is more worse then the other?
      That is really really stupid. Java is Open Source, anyone can find and report bugs. That isn't true for .NET.

      Do you call Linux more insecure, only because for a Linux distribution like RedHat there are many more bugs and vulnerable reported then for Windows? Do you call Microsoft IIS more secure, only because Apache have more bugs reported? Fuck you.

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    12. Re: Critical Bugs by Anonymous Coward · · Score: 0

      ActiveX has everything to do with .NET. Realistically, you will use ActiveX controls in your .NET code because they are still very prevalent in the wild.

      As for Java, I would expect more vulnerabilities because Java, unlike .NET, tries to be a self-contained environment. What people forget about Java is that it's a virtual machine (that's the V in JVM). TO make things portable, Java has to be a transportable OS. .NET relies on the entire MS echo system. Include Windows vulnerabilities with .NET and the two are probably comparable...unless you run Java on Linux, then .NET loses.

    13. Re: Critical Bugs by GoogleShill · · Score: 1

      No they are not. They are all over the runtime and library: Libraries, Hotspot, JavaFX, AWT (many), 2D, serialization, reflection, JAXP, RMI, beans, JAX-WS, etc etc. They are amplified by the fact that many of them are indeed in a library/feature that can be accessed through applets from remote. But the vast majority of the vulnerabilities exists isolated from the applet and could be exploited through other channels.

      Sorry, but that's not true. I check fairly often to see when it's time for us to update the JVM that we ship, and almost none of the vulnerabilities affect a standard application. They are almost 100% sandbox bypass bugs. It's very rare that I need to update due to a vulnerability.

      And even so, there has been precious few vulnerabilities in ActiveX.

      You're right, ActiveX has had few vulnerabilities because it doesn't even attempt to sandbox the object, whereas the Java vulnerabilities in Applets are getting around the sandbox. You let an ActiveX control run, it gets access to your system. There isn't much room for bugs because the entire concept is a vulnerability.

      However, the ActiveX objects marked as "safe for scripting" have been riddled with holes since the beginning, which is why there have been so many "drive-by download" exploits that don't even require the user to allow an ActiveX control to run in a page.

    14. Re:Critical Bugs by higuita · · Score: 1

      maybe, but just maybe because no ones use it...

      the top plugins have constant stream of security holes because they are the top ones, every cracker wants to find a hole to silently install malware in millions of desktops, just by opening a inocent (and maybe already hacked) web site

      --
      Higuita
    15. Re: Critical Bugs by Anonymous Coward · · Score: 0

      > If you want to be safe, go with Microsoft's product.

      Said no one, ever.

    16. Re:Critical Bugs by hobarrera · · Score: 1

      Nobody runs silverlight, hence, nobody is interested in cracking it, and therefore, not bugs are found.

  8. I hate them both by Gothmolly · · Score: 5, Interesting

    As they are the harbingers of the new age, post dotcom world, where overspecced hardware fixes everything, where there are legions of entitled douchebag "developers" who took a certification course, and of apps which can't run in less than 8GB of memory (our resident BOFH hung up on our developers when they asked for a 64GB VM because they kept getting OOM errors in Java).

    In short, both languages rode the crest of the cultural revolution where it is now OK to suck, to offshore code development with no expectation of quality coming back, of "agile" methods where your next version is always going to be the stable one. I'm not exactly saying that these languages CAUSED any of this, but there is at least a temporal correlation.

    Yes, I am a Unix guy, and yes, I have grey hair.

    --
    I want to delete my account but Slashdot doesn't allow it.
    1. Re:I hate them both by Elfboy · · Score: 2

      If I only had mod points....

      Also a grey hair here however C# has been paying the bills lately.

      --
      * We dance where angels fear to tread *
    2. Re:I hate them both by PolygamousRanchKid+ · · Score: 1

      Ok, I'll bite . . . so is there anything that you do like . . . ?

      --
      Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
    3. Re:I hate them both by BitterOak · · Score: 1

      Ok, I'll bite . . . so is there anything that you do like . . . ?

      I'm guessing based on his comment, probably C, maybe even some assembler.

      --
      If I can be modded down for being a troll, can I be modded up for being an orc, or a balrog?
    4. Re:I hate them both by Anonymous Coward · · Score: 0

      Web development? That's nice and lean and really well specified.

      Now I need to replace my keyboard.

    5. Re:I hate them both by Mitchell314 · · Score: 1

      When you're trying to put food on the table in this economy, working as an inexperienced developer isn't what most would call being a douchebag.

      --
      I read TFA and all I got was this lousy cookie
    6. Re:I hate them both by hsmith · · Score: 2, Funny

      Nice rant, grandpa. Yeah, we should all be coding in ASM, because it produces such better products! Eyeroll.

    7. Re:I hate them both by The+End+Of+Days · · Score: 1, Funny

      I guess it was easy in the old days when no one gave a shit if your software actually did anything. Unfortunately for the real world, you don't just get to target 15 or 20 experts anymore. There are now BILLIONS of users.

      The scale probably hasn't sunk through the grey yet, but don't worry, you'll die someday and not have to worry about it.

    8. Re:I hate them both by Anonymous Coward · · Score: 0

      Very ignorant rant. Me and many other .Net devs come from a traditional background where we have to consider garbage collection and such. We know how .Net's GC works and how to make fast, low memory applications. I wouldn't shit all over your language of choice because noobs in it frequently get segfaults.

    9. Re:I hate them both by Anonymous Coward · · Score: 1

      As they are the harbingers of the new age, post dotcom world ...

      Except that Java was started in 1991 (with Oak) and was released in 1995. Would you prefer C++, which was the mainstream alternative during that time period? As Guy Steele has said: "And you're right: we were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp. Aren't you happy?"

      Personally I think that Java made "non-native" code much more acceptable, which allowed Python, Ruby, and even JavaScript, to become more mainstream. Perl has/had been around for a while, but it was generally squirreled away in the background with the sysadmins. "Real" developers compiled code.

      In a perfect world we'd probably only be using Smalltalk/Lisp/Scheme, but as alternatives go, Java and .NET are pretty good for the average (or below average) code monkey as compared to straight C, C++, or assembler, which is what most developers probably had on their resumes back then. We're farther along now with "scripting" (i.e., dynamic) languages, but we needed a stepping stone for better acceptance IMHO, and Java isn't the worst you can do in that regard, especially given the historical context.

      It got people halfway to actually-good languages, which isn't a bad accomplishment. You now have the option many more languages, so don't poo-poo it just because you don't like coding in it.

      I'm sure Guy Steele wants/wanted to do certain things differently, but given his language experience (C, Fortran, Java, Lisp, Scheme, 'ECMAScript'), I think Java could have been a lot worse, and we should be content with what it allowed to happen with regards to what's acceptable in the mainstream. And even if you don't like the language, the JVM is a pretty good place to run other dynamic languages nowadays as well.

    10. Re:I hate them both by roman_mir · · Score: 0

      Out Of Memory errors, yes, fucking Java, why didn't it learn to run out of memory gracefully, like C and C++, (or maybe PHP or Python or Ruby or just shell script) where this is not a problem obviously and people can't cause memory leaks either according to ... you?

    11. Re:I hate them both by Anonymous Coward · · Score: 1

      >Would you prefer C++. . .?
      Yes

    12. Re:I hate them both by Anonymous Coward · · Score: 0

      Your .Net developers suck.

      I'm the primary developer and architect of an all .Net system that runs very efficiently, TYVM. It consists of:
      - A DotNetNuke website with around 75 custom modules
      - A web service or two
      - A couple of command line apps
      - A WinForms app that uses one of the web services
      - A WinMo app that uses one of the web services
      - A SQL Server instance with multiple databases, all accessed from DNN, the web services, and the command line apps
      - SSRS, with server-side (.rdl) report templates and data sources
      - BizTalk, for EDI processing

      While there's plenty of horsepower behind all of this, none of it is particularly overtaxed like you describe. The command-line apps use around 20MB each (most of that is mscorlib.dll, usually). The web site and services hum along with a few dozen MB, which is typical. SQL Server is a hog, and had to be limited to 24GB, but it's on its own box for a reason. And the WinMo app is a measly 500KB, which is good, because WinMo won't allocate more than 32MB to any single app, including all of its libraries, shared or not. All of it is managed .Net, written in C#. (Except for a hardware-capabilities library for the WinMo device. It requires COM interop.)

      The production environment serves 500+ users across about 40 US states (and 3 time zones).

      And I don't have any certifications. I'm too busy to bother, since I'm actually working.

    13. Re:I hate them both by Anonymous Coward · · Score: 0

      This is why I like c++. With boost it's on par with Java or .Net for most needs. And c++ 2011 cements that. plus it uses about 1/10th the memory.

    14. Re:I hate them both by Anonymous Coward · · Score: 1

      There's the good kind of restraint and there's the poor kind of restraint, for example just recently I heard that datetime2 had been banned on our SQL Server because it had "useless higher precision we don't need and takes more space". Except datetime is 8 bytes, datetime2 would be 6 bytes with the 0 fractional second precision we need and 8 bytes at the worst. Not that I think it's really what's bogging us down despite having 100M+ row tables, in my book 100M * 2 bytes = 200MB which is a fart compared to the data amounts we're processing. He's the old kind of gray hair who's working to give me gray hair, I now avoid his advice when I can so I don't have to go against it.

      We're not doing Unicode (varchar over nvarchar) for similar reasons, and there's opposition to indexes and foreign keys that slow things down. That's great if you want a write-only database with no integrity checks, but table scans makes it almost useless to query. And yes I've had to fight for more memory on my development workstation because I'm testing a process that takes ~10GB of RAM to run on the production server (which has 120 and is the only place this code is going to run) but pretty much chokes on my 8GB. I lost that fight, so I can run smaller files but if one of the huge ones dies in production, well good luck debugging that. ACing since I'm bad mouthing both my employer and semi-boss (not formally and HR-wise, but who manages me in practice).

    15. Re:I hate them both by spongman · · Score: 1

      Yay, yet another 'IT guy' that has no clue about the relative costs of developer hours and RAM.

    16. Re:I hate them both by narcc · · Score: 2

      Yeah, because ASM is the only alternative. Eyeroll.

      "Grandpa" is right. We've traded an awful lot of bloat for ... what, exactly? Vague promises of improved developer productivity? The outright lie of simplicity?

      He may not be willing to blame the languages outright, but I'd back him up if he did.

    17. Re:I hate them both by JonJ · · Score: 1

      Hahahaha! Oh wait, you're serious? Hahahahahahahahahahahahahahahaha! Any of the *BSDs kick Windows ass when it comes to both lean and stable.(Not mentioning Linux, since that's "not UNIX" for some people).

      --
      -- Linux user #369862
    18. Re:I hate them both by Anonymous Coward · · Score: 0

      of "agile" methods where your next version is always going to be the stable one

      Every version is supposed to be stable. At least we work with that premise.

    19. Re:I hate them both by strikethree · · Score: 1

      +6 Insightful

      --
      "Someone needs to talk to the tree of liberty about its ghoulish drinking problem." by ohnocitizen
    20. Re:I hate them both by gbjbaanb · · Score: 1

      yes, because those "developers" (eg the one earlier in this story who claimed that everything in .NET was derived from Object) are thew ones who will code for little pay, thus kicking your out of your job. After all, why pay for one quality guy when you can get ten programmers for the same price - a programmer is a programmer, right, and if there's issues with quality, you obviously just don't have enough managers, QA analysts and project management team leads to manage the process...

    21. Re:I hate them both by gbjbaanb · · Score: 2

      yeah, RAM is expensive - especially when your server will only stack a fixed number of sticks in there, and its being shared with several other teams. (and before you say "buy another server", you have to consider the up-front cost of it, plus the maintenance contract with the supplier plus the electricity to power it and the aircon - and electricity certainly isn't cheap nowadays, especially when you go down that road, because next thing you know, each team will want their own, and then some will want 2 or 3 just to run your crap bloated piece of software-suckness)

      Whereas developers are really cheap - you can get whole teams of them in India for next to nothing.

      the main thing is that making efficient software costs a lot less than you want to make out - given the costs of developing the features in the first place, plus maintenance, the added overhead of a good design and implementation is insignificant (and possibly will save you money in hardware and maintenance and support). People think that writing software quickly is a good thing, its not - spending time to figure out what you need and writing it right is the way to do it. The implementation in code should be a relatively small part overall.

    22. Re:I hate them both by angel'o'sphere · · Score: 1

      (our resident BOFH hung up on our developers when they asked for a 64GB VM because they kept getting OOM errors in Java
      Well, did they have a memory leak? If so they should have profiled and fixed it.
      Did they work with such huge amounts of data? Then perhaps the request was legitimated.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  9. What C# have that Java sorely lacks by benjymouse · · Score: 3, Informative

    Async methods (huge!)
    Generator methods
    Partial classes/methods
    Reified generics
    LINQ (as in LINQ to objects, LINQ to Entities, LINQ to XML - all part of the core framework)
    Dynamic typing and -interop
    Value types
    Operator overloading
    Implicit/explicit type conversions

    --
    Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    1. Re:What C# have that Java sorely lacks by Shados · · Score: 1

      Don't forget properties as a first class concept.

    2. Re:What C# have that Java sorely lacks by TheGavster · · Score: 2

      ...
      LINQ (as in LINQ to objects, LINQ to Entities, LINQ to XML - all part of the core framework)
      ...

      This is my biggest gripe with TFA: He says "the data access APIs are complete, and you can effectively accomplish the same thing". Sure, you could, with only a slightly smaller amount of code than accomplishing the code in C. The ability to both filter data and synthesize new records through combination easily, even as a feature of the standard library, is powerful. That it is a syntactic feature is amazing on the order of Perl making regular expression literals a thing. Java has absolutely no construct that allows that kind of functional programming to happen.

      --
      "Because Science" is one step from "Because old book". Try "Because of my experiment testing my falsifiable assertion".
    3. Re:What C# have that Java sorely lacks by KingMotley · · Score: 1

      You can add lambda expressions as well, although, that's coming in JRE 7, no, 8 maybe.

    4. Re:What C# have that Java sorely lacks by Anonymous Coward · · Score: 0

      C++/CLI. I've written wrappers around C++ libs in C++/CLI and it's pretty nice. Way easier than JNI.

    5. Re:What C# have that Java sorely lacks by sproketboy · · Score: 0

      Most of these are bad ideas so I'm glad they are not in Java.

    6. Re:What C# have that Java sorely lacks by sproketboy · · Score: 0

      Right. Yet another bad idea.

    7. Re:What C# have that Java sorely lacks by ADRA · · Score: 0

      "Async methods (huge!)"
      NIO / NIO2 ? I'm not sure what you're referring to. You can write anything you like with things like Runnable or Executor's. The big limitation is tail processing in java, but there are third party frameworks that make resuming blocks easier (though not a first class language feature). When you introduce this to a top level, you have to handle what to do with that now parked thread stack and how to clean it up when something bad happens. Its not a trivial problem, but hopefully one that lambda expressions will iron out in Java 8.

      "Generator methods"
      I'm assuming you're talking about re-implementing common framework service implementations, and if so Java has a ton of non-standard techniques to do this that most developers work with. It'd be nice if they were more consistent of the implementation though.

      "Partial classes/methods"
      Java 8 roadmap I believe

      "Reified generics"
      Yup, Java needs this

      "LINQ (as in LINQ to objects, LINQ to Entities, LINQ to XML - all part of the core framework)"
      JPQL / CriteriaQuery is the closest thing in JavaEE which do the same thing, though in a more ugly way. The one plus of Java's impl is that they didn't need a core language change to support it. I generally like simpler languages that rely on libraries to enrich vs. stuffing more and more into the core syntax.

      "Dynamic typing and -interop"
      I personally hate this, but there are half a dozen JVM based languages that support it.

      "Value types"
      Overrated and as mentioned in the article fully supportable as long as you create immutable objects. If you want the idea of value objects, create cloner or serialization (which is probably what .NET is doing behind the scenes anyways). Honest question, is the value object copy shallow or deep? Either way could be potentially horrible depending on the usage scenario.

      "Operator overloading"
      Thank fcking god this was never implemented. What a horrible horrible idea than changing the behaviour of +,-, etc.. Leave a method to do 100% the same thing and make it VERY clear wtf is happening vs. burying cleaver code behind common syntax patterns.

      "Implicit/explicit type conversions"
      Same as previous? Why not have .toInt() or toString() vs. burying the magic behind things?

      --
      Bye!
    8. Re:What C# have that Java sorely lacks by Anonymous Coward · · Score: 0

      Frankly, the lack of all the things you describe is a reason I like Java. For the most part, I can pick up some well-written Java code and see what it's doing without much fuss. No unexpected threads starting up (calling code looks identical if a method is async or sync). No inverted logic from generators. I don't need to dig through several files to find a method. No weird DSL layered on top. Static types let me, my IDE, and my compiler know what everything is and point out problems immediately. No trying to figure out what some clever developer intended for "|" to mean in some arbitrary class. And no code getting called under the hood when types get cast implicitly. Much of this stuff is syntactic sugar, and not the kind that cuts down code sizes by significant amounts.

      To be fair, generator methods are nice in some contexts, but then you get developers who see everything as a generator, yielding code that has more generators than functions (pun intended).

      Well-written code that uses all the features you mention just isn't as readable and maintainable.

    9. Re:What C# have that Java sorely lacks by lgw · · Score: 1

      Properties as they are now in C# are a great idea - you don't need a private member variable backing them. They're now just member variables with the option to have different access control for reading an writing (e.g., public get, private set) and the option to hook in some code on get or set on those rare occasions when you need to. It just needs to evolve a bit further now to eliminate the distinction between members and properties and we're set.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    10. Re:What C# have that Java sorely lacks by benjymouse · · Score: 1

      "Async methods (huge!)"
      NIO / NIO2 ? I'm not sure what you're referring to. You can write anything you like with things like Runnable or Executor's.

      Not even close.

      Async/await are language extensions that allow you to write asynchronous code as if it were synchronous. Note how it is NOT about parallel/threads (although that is also a use case) but a much more fundamental concept of asynchronicity. As such you can compose asynchronous calls with branches, loops, try-catch blocks etc. Without such language support you will have to rely on futures/promises that are implemented in separate methods. Thus, you cannot easily loop over such futures/promises as they span method boundaries. Add try-catch blocks to the mix and it becomes unwieldy.

      C# async/await solves the problem elegantly and allows you to compose async methods in a straightforward manner.

      The big limitation is tail processing in java, but there are third party frameworks that make resuming blocks easier (though not a first class language feature). When you introduce this to a top level, you have to handle what to do with that now parked thread stack and how to clean it up when something bad happens. Its not a trivial problem, but hopefully one that lambda expressions will iron out in Java 8.

      You can hope. Meanwhile the problem has been solved in C#: There is no "parked thread stack" as there is no extra thread. Instead the compiler will perform some really clever rewriting and turn your code into a state machine to implement the logical flow while allowing the thread to exit out of the code (to be continued at the same state later).

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    11. Re:What C# have that Java sorely lacks by benjymouse · · Score: 2

      "Generator methods"
      I'm assuming you're talking about re-implementing common framework service implementations, and if so Java has a ton of non-standard techniques to do this that most developers work with. It'd be nice if they were more consistent of the implementation though.

      No, I'm talking about the ability to create methods that use the yield return and yield break syntax to implement infinite sequences or just allow me to yield items of a sequence and allow the consumer to process each item as it is produced rather than creating the entire sequence before returning.

      http://msdn.microsoft.com/en-us/library/vstudio/9k7k7cf0.aspx

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    12. Re:What C# have that Java sorely lacks by Anonymous Coward · · Score: 0

      Async:
      http://msdn.microsoft.com/en-us/library/vstudio/hh191443.aspx
      Syntax for composing continuations of asynchronous-capable tasks as if it is synchronous code. Whether or not it is truly asynchronous depends on the implementation of the called method and how quickly each task completes. The context under which the continuation executes is ambient allowing desktop applications to continue on the user-interface thread and for web applications to continue under any thread attached to the current HTTP request.


      public async Task InsertWebContentIntoDb(string url)
      {
              string content = await WebClient.DownloadStringAsync(url);
              try
              {
                      int newId = await InsertIntoDatabase(content);
                      return newId;
              }
              catch (Exception exception)
              {
                      await LogException(exception);
                      return -1;
              }
      }

      Generators/Iterators:
      http://msdn.microsoft.com/en-us/library/vstudio/dscyy5s0.aspx
      Functions which can generate/iterator any number of values and enumerated. Can contain almost any imperative code (some limitations on try/catch constructs) and return infinite values. Implemented via a state machine the portions of code only execute when the enumerator moves to the next value of the iterator.

      The following only prints Bob and never prints END.

      public IEnumerable GetNames()
      {
              yield return "Bob";
              yield return "James";
              yield return "Samantha";
              Console.WriteLine("END!");
      }

      public void EnumerateNames()
      {
              foreach(string name in GetNames())
              {
                      Console.WriteLine(name);
                      break;
              }
      }

    13. Re:What C# have that Java sorely lacks by ADRA · · Score: 1

      Well, looking it over, it does save on either performance or writing extra boiler plate to create an interator that stores loop processing state itself, but it seems like something that I'd use very sparingly, or more likely end up implementing it in different ways anyways. Leaving the code as such seems finnicky to me considering that either the inner or outer blocks could mutate the control flow (Like iterating over a list while adding/removing entries from it as a side-effect).

      And just a side note, taking threads out of the equation, the internal state of the power iterator and its state must be stored somewhere, regardless if you're seeing it or not. Don't get me wrong, the technique seems intreguing, but not something I'd doom a language upon.

      For curiosity sakes, can I write nested generators? Now that would be plenty of fun!

      --
      Bye!
    14. Re:What C# have that Java sorely lacks by ADRA · · Score: 1

      Java does have them:
      http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ExecutorService.html
      http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html

      But your comment over the wieldiness of one over the other baffles me. Fundamentally, Java's futures should operate in the exact same way as C#'s version with the same caveats. Do you know any real world example to help clear up this dissonance?

      Once again, its part of the standard library without needing to change the language's syntax. The C# variant does require less typing, but IMHO the Java equivalent makes things a lot more clear in terms of what's going on and how, though thats possibly out of familiarity.

      --
      Bye!
    15. Re:What C# have that Java sorely lacks by Horshu · · Score: 1

      I haven't used Java since .Net 1.0, but does Java have the syntactic sugar constructs, like the 'using' statement (for clean handling of unmanaged resources)? I don't recall it ever getting properties (although it seems to have something similar to auto properties with some new interface feature IIRC), but .Net has a bunch of those that make the source code a hell of a lot easier to read. I think it may have gained something similar to attributes (metadata), but .Net would have had about a 10 year head start on that.

    16. Re:What C# have that Java sorely lacks by Shados · · Score: 2

      The distinction is rather important. A property is a semantic construct. It has a meaning. A member is an implementation detail.

      Its the same with Events and Delegates. While they do have some technical differences, the main difference is a semantic one. An event is a semantic way to interface with an object. A delegate is an lower level construct often, but not always, used in the implementation of an event.

    17. Re:What C# have that Java sorely lacks by Shados · · Score: 1

      You can and its rather frequent in C# to have them. Not too different from using an iterator within an iterator. Common, basic stuff. The yield operator is just syntax sugar to easily create iterators. They're used roughly for the same thing, but are closer to their semantic idea.

      Since C# has quite a few functional constructs, having an easy way to create an iterator/generator is critical to keep the code clean, as they're used all over the place. In LINQ, they're basically in every methods.

    18. Re:What C# have that Java sorely lacks by Shados · · Score: 1

      What you linked is similar to the TPL in .NET, which is also part of the standard library and not language constructs. They're very useful.

      Async/await is a way to make these things a first class concept of the language, so that once you have fairly elaborate scenarios/continuations, you can still read the code from top to bottom.

      Amusingly enough, the best examples of these concepts I've seen to explain them aren't in the C# documentation, its in CoffeeScript. IcedCoffeeScript rather. The later also implement the same concepts, and they have "before" and "after" examples showing the difference. In complex scenario, it reduces code complexity by a factor.

      In .NET, the most common uses tend to be for responsive UI (not in the web sense. I mean UI that doesn't block the thread, ever). When you do stuff like that, which is standard these days, and rely on external resources (databases, web services, REST APIs, etc), you very, very quickly end up chaining promises and callbacks like crazy. Having good framework support makes things better. Having good language support makes things best.

    19. Re:What C# have that Java sorely lacks by hibiki_r · · Score: 1

      It makes everything very hard to read, and has burned thousands of newbies over the years. Heck, I've seen experienced Java developers screw up ExecutorService tasks plenty of times. This happens so much I've seen multiple annotation based systems trying to hide this from newbies in a few shops.

      Assembly language makes it much easier to see what is going on than VMs that use garbage collection, but only of you know 20 times as much, and don't value being able to glance at code to see what it does.

      I write 20 times more code for a JVM than for .NET, but on this, I'd definitely have to give the nod to C#. The language is just moving far faster than java is. The Java ecosystem's saving grace is the three languages that are actually doing something interesting: Scala, Groovy and Clojure. Every time I have to write 10 lines of code that can be done in a single line in C#, F# or Scala, it hurts a little bit more.

    20. Re:What C# have that Java sorely lacks by angel'o'sphere · · Score: 1

      Unfotunately you don't know what you are talking about:

      "Async methods (huge!)"
      NIO / NIO2 ? I'm not sure what you're referring to. You can write anything you like with things like Runnable or Executor's. The big limitation is tail processing in java, but there are third party frameworks that make resuming blocks easier (though not a first class language feature). When you introduce this to a top level, you have to handle what to do with that now parked thread stack and how to clean it up when something bad happens. Its not a trivial problem, but hopefully one that lambda expressions will iron out in Java 8.

      An asynch method has not much to do with NIO.
      It is a method that runs in the background and the caller returns/continious imediatly.

      "Generator methods"
      I'm assuming you're talking about re-implementing common framework service implementations, and if so Java has a ton of non-standard techniques to do this that most developers work with. It'd be nice if they were more consistent of the implementation though.

      You don't know what a generator is. A generator is a method that does not use "return" to yield a result and is gone, but uses "submit" and waits behind the submit for the next time it is called. So the generator continues at the popint where it yielded its last result. You can mimik that with functor objects ofc.

      "Partial classes/methods"
      Java 8 roadmap I believe

      "Reified generics"
      Yup, Java needs this

      So it does need real templates and multiple inheritance ...

      "LINQ (as in LINQ to objects, LINQ to Entities, LINQ to XML - all part of the core framework)"
      JPQL / CriteriaQuery is the closest thing in JavaEE which do the same thing, though in a more ugly way. The one plus of Java's impl is that they didn't need a core language change to support it. I generally like simpler languages that rely on libraries to enrich vs. stuffing more and more into the core syntax.

      Most people don't understand what LINQ is about. You can do SQL like querries on internal datastructures, like an Array[Person] or HashMap[Person, Address].
      Querring Databases with it is jsut a corner feature rounding it up. In other words: standard Java has nothing similar. But there are fluent Open Source libraries that add this to Java.

      "Dynamic typing and -interop"
      I personally hate this, but there are half a dozen JVM based languages that support it.
      No they don't. You think they do because you again don't understand! A Jython object in Java is by default only an Object and has no methods to call at all. So a bit of Java code can not call a method in a Jython object. You have explicitely to program for it and make the Jython object smart (by adding some annotations and giving a Java interface).


      "Value types"
      Overrated and as mentioned in the article fully supportable as long as you create immutable objects. If you want the idea of value objects, create cloner or serialization (which is probably what .NET is doing behind the scenes anyways). Honest question, is the value object copy shallow or deep? Either way could be potentially horrible depending on the usage scenario.
      Again you dont know what that is.
      struct Range {
      int start, end;
      }
      struct TwoBlock {
      Range first, second;
      }

      If both are value types TwoBlocks looks like this:
      Data:
      TwoBlocks.first.start
      TwoBlocks.first.end
      TwoBlocks.second.start
      TwoBlocks.second.end

      In other words: in memory you have 4 ints in a row, which can be written binary to a file in a row or be sent via thenetwork.

      In Java it looks like this:
      TwoBlocks.first
      TwoBlocks.second
      And both fields are references, that means the "numbers stored" in those fields are completely different from the values in the example above. You can not s

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    21. Re:What C# have that Java sorely lacks by lgw · · Score: 1

      The distinction is rather important. A property is a semantic construct. It has a meaning. A member is an implementation detail.

      I disagree: a member is just one way to implement a property. Pretending there's a difference always struck me as ... pretentious. Public members are part of the interface that an object presents, just like anything else. OTOH, private members, sure, implementation detail. But I've never understood why people had problems with public members where they fit the interface/contract you want for the class.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    22. Re:What C# have that Java sorely lacks by Shados · · Score: 1

      Huge problem when you do introspection. ("reflection"). There is also an issue for binary compatibility.

      If I use a member, and later I need backing logic, I have to change it to a method, if I don't have property support, since the semantic isn't part of the construct, it is implied (I mean, the public member "Foo" has the same semantic as the method "getFoo", except the later can have internal logic, the former cannot).

      So basically, I cannot switch a member to have logic without breaking compatibility, or breaking the interface, even though the semantic meaning didn't change: in both cases I have publicly available data with (because of the semantic contract of public members and getters, even if they're a method) negligible work (that is, a getter method should never have significant performance requirement for example, as callers will assume they're almost "free" to call).

      That makes very little difference when you're working code for yourself or within an organization, within the same project, etc. The difference is HUGE when you're writing a framework or component that will be used by an unknown client.

    23. Re:What C# have that Java sorely lacks by lgw · · Score: 1

      Huge problem when you do introspection. ("reflection"). There is also an issue for binary compatibility.

      Perhaps - depends on the language of course. In C++ there's no reflection, so no problem with it. In C# and Java you have annotations that you should theoretically be using to make explicit whatever semantics you have in mind (needed for serialization etc), or just assume in your code that uses reflection that you need to enumerate both public members and publically get-able properties. In practice that can be annoying to code, of course, which is why I love the new C# properties.

      If I use a member, and later I need backing logic, I have to change it to a method, if I don't have property support, since the semantic isn't part of the construct, it is implied (I mean, the public member "Foo" has the same semantic as the method "getFoo", except the later can have internal logic, the former cannot).

      They teach that in every school these days but it almost never happens. In 20+ years of coding I've seen the behavior of a publically accessible thing change from not needing a "handler" to needing one .. maybe once? It's just not much of a real-world concern.

      The difference is HUGE when you're writing a framework or component that will be used by an unknown client.

      It's far more common to have to change the interface in some other breaking way, so that you now have a new "version" of the interface that people need to code against if they want the new functionality. So, yeah, it would break the interface, but it would cause some tiny % of such breakages (at least in my experience with systems/infrastructure programming).

      However, I think that whole argument is moot these days: any "framework or component that will be used by an unknown client" I've seen in a newly-started project for the past few years has been REST or SOAP or some other text-based thing, and not a programming language-specific interface at all.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    24. Re:What C# have that Java sorely lacks by shutdown+-p+now · · Score: 1

      This comment might explain what exactly C# async/await does that Java futures do not (and why it is a language feature, and not just a library thing).

  10. if only you guys ada brain by Anonymous Coward · · Score: 0

    Lack of brain stems

  11. Disagree about ease-of-use by sttlmark · · Score: 3, Insightful

    I use both, and I find that .NET really shines when you're in unfamiliar territory and working with a part of the framework that you don't touch every day. Features are more easily discovered and idioms tend to be more consistently applied in .NET, whereas it feels like Java suffers from implementers applying the pattern du jour, forcing you to wade through more docs.

    I attribute much of .NET's success in this regard to the absolutely awesome book "Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries," which includes a lot of direct insights from the designers of the framework. Microsoft has been really good about sticking to those guidelines, and it shows.

    http://www.amazon.com/Framework-Design-Guidelines-Conventions-Libraries/dp/0321545613 ...or maybe I just understand the .NET Framework better because I read that book. I'm not aware of a Java corollary that would give me the same insights, though.

    1. Re:Disagree about ease-of-use by datavirtue · · Score: 1

      I agree with your comment but it really sucks when you have to wade through .NET docs. It is easy to track down the API documentation for Java and get examples. In .net you have to spend a half an hour on google to get a simple sample code snippet. Ask a question on stackoverthrow and get flamed about your question. "Is this Winforms, WPF, ASP---what are you using!" Winforms. "Winforms sucks why the hell are you using that?" "What language?" VB.NET. "Why can't you use C#?"

      In Java you go to the docs, see a plain hierachy with links to every class with full docs and possibly examples. If no examples are present you will find many examples very quickly with a simple search and no drama.

      --
      I object to power without constructive purpose. --Spock
    2. Re:Disagree about ease-of-use by Shados · · Score: 1

      You have the same thing on C#. What docs are you looking at that doesn't have plain hierarchies with links to every class and full docs with examples? I use it every day.

      I'll agree with the "drama" if you're using winforms and vb.net though. Long time .NET users have been burnt a few too many times by those environments, so they get emotional about them.

    3. Re:Disagree about ease-of-use by Horshu · · Score: 1

      Kudos to you mentioning FDG. That book is a great read and an even better reference. I try desperately to get my coworkers to read it, as many of them have a somewhat shallow understanding of .Net; unfortunately, laziness prevails, but getting through that book cannot help but make a person a better developer.

    4. Re:Disagree about ease-of-use by gbjbaanb · · Score: 1

      wtf? winforms was easy and simple, and worked. ITs stupid-ass WPF that is a performance dog, required a service just to render fonts FFS, and has such a sucky xml-based declaration that its driven everyone to HTML.

      vb.net is actually better than C#, falls into the "strange but true" category - my mate's just got a new job and he has to use vb.net, at first he was a bit miffed, but when he realied coding become little more than typing the first 2 letters then pressing . a few times (the IDE does most of the work for you) he;s hooked. It has a few nice features than C# doesn't have too. So as its the same thing basically as C#, if you can get round the syntax (people complain about it being bloated, but then happily use some of the C# methods like IPropertyChangeNotification that they then create delegates from.....) then you'll find its not so bad at all.

      Its the history of VB6 devs that have tarnished it IMHO. Trouble is, all those VB6 devs are now writing C# ...

    5. Re:Disagree about ease-of-use by Anonymous Coward · · Score: 0

      I'm sorry, but VB.Net sucks and no amount of "my friend blah blah blah" is going to change that. C# lacks the syntactic sugar of the With keyword. VB lacks the functionality of the unsafe keyword. And the Intellisense isn't any different between them that I've ever noticed, but I've only been working in .Net since VS2005, so maybe there was something way back then that mattered. So they're equal except VB is more verbose, irritatingly bubble-wrapped, and unable to do proper COM interop. You should also try looking up why "sane" VB code has to include String.op_Equality() occasionally, too. Here's a hint: you're right about VB6 queering things up. Don't believe what you see on the MSDN docs, either. The VB "=" operator does not do the same thing as C#'s "==" operator. The MSIL is noticeably different. So, yeah, I'll just stick with C#, thanks.

      Your comments about WPF are spot-on, however. WinForms is easy and functional without a lot of unnecessary overhead. WPF is just trying to be Windows apps put together by web designers that don't understand that UI element flow is not "automagic". Oh, and it's for those MVC fanbois from Java-land, too. In real life, not everything is data bound and sometimes things represent actions rather than data. WPF doesn't work well in those scenarios, in my experience. WinForms just works, as long as you're not too lazy to make it do the fiddly stuff without all the UI "magic".

  12. A tie? by Anonymous Coward · · Score: 0

    Try to develop a Web app in .NET and run it on Linux server (translate: .NET is Windows only. who can afford that these days?)

    1. Re: A tie? by Anonymous Coward · · Score: 0

      Who can afford windows server?

      The shop that doesn't have to pay linux sys admins

    2. Re:A tie? by datavirtue · · Score: 1

      What about Mono? Just asking, haven't tried it.

      --
      I object to power without constructive purpose. --Spock
    3. Re: A tie? by datavirtue · · Score: 1

      The business doesn't really care, but who else has puked in their own mouth watching a Windows admin work? I'm so sick of even talking to these dumb fucks that I loath the IT department because of them.

      --
      I object to power without constructive purpose. --Spock
    4. Re:A tie? by blackpaw · · Score: 1

      Easy. Mono + Apache. Have done it with our vertical market product.

    5. Re:A tie? by Requiem18th · · Score: 0

      Mono is like a parallel world's .NET. It compiles and runs C# but it won't run arbitrary .NET because it lacks what you could call .NET's standard library. It has reverse engineered versions of some of it but not anywhere near capable of running the usual Windows application.

      However run C# at your own risk, MS owns everything related to it and it has specifically licensing it to the public and has the capacity to shutdown Mono at any time.

      *sigh* unfortunately this comment is going to attract a lot of MS chills repeating ad nauseam phrases like "community promise" and "estoppel".

      The gist of it is that rather than an actual license MS published a statement, a (quote) "promise not to sue". This, and the fact that MS has cooperated with Mono before creates "estoppel" which is legalese to mean that MS can't back down from it's promise.

      THE PROBLEM
      The problem is that the promise specifically states that MS "won't sue for properties they control" related to .NET.
      They didn't promise to hold onto the property, and a third party acquiring it is not bound by the promise. So MS can sell 1 or more patents related to .NET, C# and other CLI languages to a third party from which they can then obtain a use license, for a price.

      And the stinger is that MS has been caught marketing Linux patents to patent trolls before. Mind you, those were Linux, not .NET patents, but the intention is obvious.

      And now get ready for the flurry of comments defending .NET most of which will fall in one of the following 4 categories.

      1. Completely ignoring the above and pretend that the promise is exactly the same as a license in every way. In other words, lie.
      2. Dramatic displays of indignation at how we dare ask for a license instead of merrily infringing on patents for which we have been promised not to be sued over (by MS).
      3. Confident declarations that Mono can code around any possible legal threat that could possibly arise.
      4. Vehement assertions that MS will never ever ever ever ever ever exercise this option that they prepared for themselves by not actually issuing a license. ...aaaand combinations of the above along with random insults as usual.

      --
      But... the future refused to change.
    6. Re:A tie? by Anonymous Coward · · Score: 0

      99% of the major .NET libraries for web development don't work on Mono and Mono performance is crap.

    7. Re:A tie? by benjymouse · · Score: 2

      it has specifically licensing it to the public and has the capacity to shutdown Mono at any time.

      *sigh* unfortunately this comment is going to attract a lot of MS chills repeating ad nauseam phrases like "community promise" and "estoppel".

      You are obviously aware of it, so why do you continue to spread this FUD? I find it especially ironic in a discussion about comparison between Java and C#, where only one of the vendors have actually tried to sue. And it is not Microsoft.

      The history with the community promise is that first Microsoft submitted C# and the core libraries to ECMA and ISO for standardization. In doing so Microsoft committed to offer license for any patents essential to implementation under RAND terms (Reasonable And Non Discriminatory).

      "IT IS A TRAP" cried the FOSS community! "While they may be forced to license the patents they can still sue and open source projects cannot afford a trial against Microsoft, so they can still force Mono underground!!"

      Microsoft then ALSO placed C# specification and core libraries under it's community promise. Such a promise has (as you pointed out) legal estoppel - which in layman's terms means that if Microsoft sues you can invoke the unilateral promise and have the case dismissed.

      You may be correct that if we follow your wild FUD that Microsoft can sell off an essential patent and that way wiggle out of the estoppel promise. Then again you could very well be wrong, because the legal basis of the estoppel is that you acted in good faith. A buyer of the patent cannot change the fact that you acted in good faith.

      But your FUD is a strawman anyway, since you have not explained how Microsoft could escape the patent grant they have given to anyone who implement C# and core libraries. Such grants cannot be revoked by a buyer of a patent.

      The gist of it is that rather than an actual license MS published a statement, a (quote) "promise not to sue".

      You are wrong. The promise not to sue came after MS granted anyone who requests it a free license on any essential patent necessary for the implementation of C# and/or core libraries.

      And now get ready for the flurry of comments defending .NET most of which will fall in one of the following 4 categories.

      With the amount of FUD, inaccuracies, speculation and free fantasy you should certainly expect to be corrected.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    8. Re:A tie? by Requiem18th · · Score: 1

      Microsoft submitted C# and the core libraries to ECMA and ISO for standardization. In doing so Microsoft committed to offer license for any patents essential to implementation under RAND terms (Reasonable And Non Discriminatory).

      But your FUD is a strawman anyway, since you have not explained how Microsoft could escape the patent grant they have given to anyone who implement C# and core libraries. Such grants cannot be revoked by a buyer of a patent.

      Make up your mind, are "C# and the core libraries" offered free or under a RAND? Also "C# and the core libraries" is only a part of what the Mono project needs to subsist independently.

      I'm unconvinced. I'm not a layer but the FSF has lawyers that understand this much better and they recommend against it. I'd rather take advise from the lawyers of the FSF than some random guy in slashdot.

      I find it especially ironic in a discussion about comparison between Java and C#, where only one of the vendors have actually tried to sue. And it is not Microsoft.

      He asked about Mono. The situation with Java is similar I know.

      --
      But... the future refused to change.
  13. Re:first by iluvcapra · · Score: 2

    2003 called, it wants its article back.

    --
    Don't blame me, I voted for Baltar.
  14. Short version by Livius · · Score: 1

    Both have big APIs.

  15. Type Erasure by Anonymous Coward · · Score: 0

    The bit at the end about type erasure in Java is either misleading or incorrect. For an explanation that doesn't suck, see here:

    http://docs.oracle.com/javase/tutorial/java/generics/erasure.html

    1. Re:Type Erasure by EvanED · · Score: 1

      Um, as someone who is somewhat (but not only somewhat) familiar with generics in both systems, I don't see anything in TFA's explanation which is misleading or incorrect, nor contradicted by your link. Care to elaborate on what you mean?

    2. Re:Type Erasure by Anonymous Coward · · Score: 0

      Reifiable versus Non-reifiable types for one

    3. Re:Type Erasure by EvanED · · Score: 1

      OK... so is what you're saying that there is a greater difference between the two runtimes than what TFA says, because .NET doesn't have the possibility of heap pollution? Something like that?

    4. Re:Type Erasure by benjymouse · · Score: 1

      Um, as someone who is somewhat (but not only somewhat) familiar with generics in both systems, I don't see anything in TFA's explanation which is misleading or incorrect, nor contradicted by your link. Care to elaborate on what you mean?

      I can help. The author claims this:

      Java, however, uses a method called type erasure. Essentially, the type checking only happens at compile time. The actual container types internally could still hold any type, but the compiler explicitly stops you from attempting to put other types into the containers.

      That is wrong. In Java, type checking happens at *runtime*. During the type erasure the compiler will add downcasts into the code which will be evaluated at runtime. When a collection has been declared with item type as Person, you can insert Person specializations into it, like Student or Teacher. But because of type erasure the collection will in reality be a Object collection. Hence, when you read from the collection the compiler must ensure that it is indeed a Person being read.

      Nevermind how the authors hastens to apologize for the shortcomings of type erasure. He also fails to mention one very big difference: Java generics do not support primitive/value types. Storing Integers in collections incur a significant overhead compared to int's because of boxing, heap allocation, unboxing and garbage collection.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    5. Re:Type Erasure by ADRA · · Score: 1

      You're right, the article does a pretty accurate reflection of the realities of both systems. I'd love to have runtime generics to work with under very rare conditions, but just as the article mentioned, there are workarounds that lead to slightly less elegant code to do so. Mind you, this is generally only a problem for generalized frameworks more so than day coding tasks, but its still a nice to have.

      --
      Bye!
    6. Re:Type Erasure by benjymouse · · Score: 1

      OK... so is what you're saying that there is a greater difference between the two runtimes than what TFA says, because .NET doesn't have the possibility of heap pollution? Something like that?

      Type erasure foregoes a number of constructs available with reified generics in C#:

      * Support for primitive/simple and value types without boxing/unboxing overhead
      * Ability to use typeof() operator (.class in Java) on generic parameters
      * Ability to create new instances of generic parameter types (with the C# new() constraint)
      * Ability to declare, throw and catch generic exceptions.
      * No per-realization static scope. Statics behave strangely in Java generics as all realizations share static members.

      There are other more esoteric restrictions because of Java type erasure (yes, heap pollution is one of them).

      Also consider that C# generics are fully verified at compile/load time, whereas Java generics need to perform downcasts at runtime, every time you return something that is of a generic parameter type.

      None of them huge restrictions - until you hit upon them and realize that you will have to create strange code to circumvent them.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    7. Re:Type Erasure by cbhacking · · Score: 1

      One of the things that's always bugged me about Java generics: array allocation. The following code works in C#. It does not work in Java:

          class bar<t> {
              t[] baz;
              public bar() {
                  baz = new t[10];
              }
          }

      To make something like that work in Java (which I've had to do before), prepare to get your hands dirty with Reflection or to be doing a lot of explicit casts. It's really annoying.

      --
      There's no place I could be, since I've found Serenity...
    8. Re:Type Erasure by RedHackTea · · Score: 1

      I think what a lot of people forget (or don't know) is that Type Erasure was used in order to make the generated .class files backwards-compatible with older .class files when they added generics in a later version. A lot of Java's limitations are due to stringent backwards-compatibility and due to it taking risks first, realizing the problems, and trying to rectify it, while C# benefited from this greatly. History and the overall picture should be taken into consideration.

      To me, this article and arguments are of little value. I use Java because it is a language close to C/C++ with garbage collection that works on many different platforms (any with a JVM). The reality of "write once, run everywhere" did not really come to fruition, but Java is at least a lot closer to it than C#. Mono is a pit stain upon Linux. Others use C# because they need to easily call Microsoft-specific code without the harder-to-write JNI and JNA code; C# runs better on Microsoft than Java, hands down.

      You pick languages based on your need (or your customer's need). When I need a complex script (that bash can't handle), I won't be using Java or C#. I'll be using Ruby, Python, etc. If I need strong Gtk support, then I will pick a language easiest to me that has the highest supported version (http://www.gtk.org/language-bindings.php). If I need strong Windows support, then I will use C#.

      --
      The G
  16. All about the Benjamins by Anonymous Coward · · Score: 0

    .NET devs make more money.

    1. Re:All about the Benjamins by datavirtue · · Score: 1

      I haven't seen many job postings for Java as of late. PLENTY of .NET.

      --
      I object to power without constructive purpose. --Spock
    2. Re:All about the Benjamins by Anonymous Coward · · Score: 0

      LOL, you must really be sequestered off in your own little tiny world there, then.

    3. Re:All about the Benjamins by Anonymous Coward · · Score: 0

      No one wants to code in .NET.

    4. Re:All about the Benjamins by Anonymous Coward · · Score: 0

      I haven't seen many job postings for Java as of late. PLENTY of .NET.

      You must be on crack....or looking for job postings on Microsoft's career site.

  17. mod_mono? by Anonymous Coward · · Score: 0

    You could do it in apache in mod_mono - it would be c# at least though not strictly speaking ASP.NET
    does that count as .NET for you?

  18. Re:I hate them both - me too by Anonymous Coward · · Score: 0

    This.
    Also, I got a nice anekdote about the .NET-Framework:
    Today I got to do XML processing. I needed to get the entity definition of a documents doctype.
    It's totally possible to get that entity name - but it's not possible to get the content. To illustrate:

    Entity:

    Content:
    (child-a|child-b|child-c)

    So a coworker of mine used ILSpy (a .NET-disassembler) and we found out, that this content is saved in a private string.
    The method InnerText was left unimplemented.

    So my coworker used some funny introspection workaround to get that private field.

    WFT, Microsoft?

    Java has this kind of doucheness, too. Compare Unicode vs. property ISO-Encoding, for example.

  19. Yes, lambda expressions - and expression trees by benjymouse · · Score: 1

    You can add lambda expressions as well, although, that's coming in JRE 7, no, 8 maybe.

    Yup. I actually forget how often I use those.

    Recently we have also seen expression trees put to good use, e.g. in Entity Framework code first to define relations, keys etc.

    --
    Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
  20. Event Models by datavirtue · · Score: 1

    I'm wondering how a comparison of the event models got skipped. Rather useless article.

    --
    I object to power without constructive purpose. --Spock
  21. Async methods by benjymouse · · Score: 1

    I'm wondering how C# async methods got skipped. Because there's nothing similar in Java?

    Async/await is huge. It makes composing async methods as terse as regular synchronous code. Unlike with the library defined task/future models, async/await adds a composable model which lets you write async methods that can loop, branch, try-catch etc. while staying perfectly async.

    --
    Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
  22. cogswell's loading the dice then rolling them by Anonymous Coward · · Score: 0

    What an asshole.

  23. Re:I hate them both - me too by sourcerror · · Score: 1

    So my coworker used some funny introspection workaround to get that private field.

    WFT, Microsoft?

    Did you think that the private modifier is a security feature?

  24. Just listen to all these lofty debates... by xtrafe · · Score: 1

    ...over all these wonderful features of both languages. And here I am, a mobile developer on the vanguard of technology, still stuck with dumbshits that suggest maybe we ought to somehow shoehorn ourselves back into JS.

    I can hear them now: "Here, just use this mile high stack of libraries with hipster names and it'll be workable, I swear. It really is a functional language, and the New Assembly, after all. P.S. CSS3 Sucks Less(TM)!"

    Forgive the troll.

  25. Re:I hate them both - me too by Anonymous Coward · · Score: 0

    WTF are/were you using for the XML processing? If you are using stream processing on an XMLReader, you will get some quirkiness... I find that getting the XML string for a given node (in, for example a larger stream with lots of the same node) then parsing each node into an XElement for handling logic against works well enough.

  26. fuck the api by Anonymous Coward · · Score: 0

    Fuck the api, lets compare developer salaries.

  27. No unsigned .. 'nuff said by Anonymous Coward · · Score: 0

    TFA is moot .. that's like comparing the Boost C++ libraries to using C++.NET .. every 'API' has a it's own set of functionality that a developer needs to know and understand in order to use ..

    C# has delegates/events which allow me to attach certain areas of code to other via (obvious) function pointers .. Java doesn't have (obvious) function pointers, instead 'everything is/has something' is the model. Want to catch when a window is closing? In Java: implement EVERY window 'event' that 'window' (JFrame as it is) interface defines ... In C#: just create a function with the same signature as the event and assign the function pointer to it

    Also, why did the original Java language developers decide to go against the grain and forgo the ability to have 'unsigned' values .. Want to know if an 'int' is above 3 million? Cast it to a long first then check

    As has been stated before too, Java (the language) forces you to do certain things .... Have a static function that you want to let other developers know could throw a specific error? Attach 'throws' on the end of the function declaration ........ oh wait, now EVERYWHERE that calls that code either has to rethrow or try...catch ....... Yes, let's enter an entire new try...catch context just to do a Thread.sleep .....

    Java as a language has certain constructs that need to be observed just as the C# language does (just as the C, C++, JS, PHP, HTML, or any other language for that matter) .. as with the API's .. well they both give my jr. guy's enough rope to hang themselves so meh to both of them ......

    Personal preference is C# for RAD or quick prototyping .. then C/C+ (with cross platform frameworks) for anything else ... Java is a bane .. not as a language or API, but to read and maintain ...

  28. Why would you even compare .NET and Java? by xebecv · · Score: 0

    They serve absolutely opposite purposes. Java is all about cross-platform support. .NET, on the other hand, was created by Microsoft for Microsoft lock-in. Don't even start about Mono. The shop that I work for develops software for 5 platforms: Windows, RHEL, HP-UX, AIX, and Solaris. For our core performance demanding jobs we code in C++. Everything else - mostly Java + few scripting languages. .NET is simply not in our lexicon for a good reason. It would be utterly useless for us.

  29. Lots of misconceptions by ndykman · · Score: 1

    I was hoping to provide some insights, but the article is just riddled with misunderstandings. I stopped reading after this line:

    "Generally speaking, the API makes use of properties in the case where you supply a class or object; but the classes in the API typically donâ(TM)t make use of properties."

    No, not at all. Properties are used pretty much everywhere in the API. Examples abound with get only properties (ahem Length?).

    Methinks Mr. Cogswell is in way over his head. Language design is not an easy subject, and it requires more than a cursory glance for the perspective of everyday programming.

    As others have noted here, C# does seem to be adopting more language features. And, having used the new async programming model, I have to say C# has taken a noticeable lead in useful features.

    Nothing prevents Java from doing the same, but given the slow progress of implementing and adopting things like lambdas, I can't say the future of Java will look all that different than today. Which is too bad; there are new ideas that are worth the effort.

  30. How can you call it a tie? by elabs · · Score: 1

    How can you call it a tie after listing tons of features that java doesn't even have? C# is the clear winner with the following features that are lacking in Java: -Properties -REAL generics (not type erasure) -async/await -value types (struct) -the ref and out keywords -the dynamic keyword (and dynamic types) -the var keyword (or type inference) -LINQ -Better introspection and reflection (Reflection.Emit) -Named parameters -Partial classes -Extension Methods -The new Roslyn (Complier-as-a-service) in C# 5 -Better built-in bindings to C++ -The ability to pin memory and get pointers to it for high-performance operations -The but-in HttpClient library -Far better GUI WYSIWYG editors and development tools for desktop, mobile and web applications C# pretty much destroys Java. It sounds like Jeff Cogswell is a Java developer that barely knows C# and therefore doesn't know what he doesn't know.

  31. East machinery by Anonymous Coward · · Score: 0

    East machinery(http://www.eastmachinery.com/) is a family of Internet-based machinery businesses which makes it easy for anyone to buy or sell online anywhere in the world. Since its inception, it has developed leading businesses in consumer e-commerce, online payment, business-to-business marketplaces and cloud computing, reaching Internet users in more than 240 countries and regions. East machineryconsists of 25 business units and is focused on fostering the development of an open, collaborative and prosperous e-commerce ecosystem.
    East machinery was founded in 2012 by pango,China who has aspired to help make the Internet accessible, trustworthy and beneficial for everyone. The privately held pango.

  32. Biggest difference is debugger capabilities by Anonymous Coward · · Score: 0

    I code in both C# and Java. I believe the biggest difference in these 2 platforms is debugger capabilities. Microsoft has a huge advantage in owning the OS and the database in addition to C#. In Visual Studio you can seamlessly step into a program running on one computer through a service call onto another computer into a database call on yet a third computer and then on into a custom stored proc inside that database engine on computer 3. You can see all the transitions that led to this point on the current stack viewer in the debugger. This even works for browser based code. In today's computing environment where many bugs are the result of miscommunication between the front end guys and the back end guys, this is a HUGE convenience.

  33. LINQ coming to Java 8 by Anonymous Coward · · Score: 1

    Check out EL 3.0 / JSR 341

    https://java.net/projects/el-spec/pages/CollectionOperations

  34. Lame by localtoast · · Score: 1

    His analysis is superficial, and his conclusion makes everyone dumber. "And then they ate ice cream," might as well been the result. Talk about s

  35. now owned by Oracle? by El_Muerte_TDS · · Score: 1

    the official Java API (now owned by Oracle)

    Oracle does not own the Java API. They own the Java trademark, and they are the current curators of the API.

  36. No one has mentioned churn vs freeze? by Anonymous Coward · · Score: 0

    Wow, no one has pointed out .NET churn vs. Java's serendipitous and unplanned freeze? Microsoft is always churning through technologies, abandoning them as fast as they can make new ones. Over the years, database activities alone have churned through ODBC, DAO, ADO, ADO.NET, LINQ to a database, EF, LINQ to EF, and now back to ODBC. All that investment in COM, COM+, DCOM, ATL, etc and then .NET happens. Microsoft tried moving C++ programmers to C#, and now they want to move back to C++. Meanwhile, Java was frozen and stable, largely because of the Sun/Oracle mess. I shudder to think what Java would be today if this freeze had not stopped "innovation".

  37. C# ahead in desktop on Linux? Since when by coder111 · · Score: 1

    I'm sorry. C# being ahead in desktop might hold true if you run your clients on Windows. If you want cross-platform apps, (and I plain refuse to work on systems that won't run on Linux), then C# is completely useless.

    --Coder

  38. Language is not the problem... by coder111 · · Score: 2

    ... management is, at least most of the time.

    Let me say that it is easy to create GREAT systems in Java (and I assume in C#/.NET). However, in enterprise world, that seldom happens. That is not because of languages, but because of several management related issues:

    1. Technical excelence is rarely seen as a goal, implementing features is.
    2. Technical fixes do not drive development, satisfying business requirements does.
    3. Things are rarely if ever refactored, consolidated or tidied up, as business does not see the benefit of doing that. And they do see the risk of regressions and breakage caused by refactoring.
    4. There are few really good architects & developers, and because of lack of refactoring and technically driven changes, any problems in design or mistakes in code will stay there forever.
    5. Management sometimes makes insane technical decisions, because of stupidity or corruption, or because they read an article that X is great and now everyone must use X, or whatever. Technical decisions must be made by technical people, otherwise bad things happen.
    6. When system becomes unmaintainable and unusable, it gets rewritten, causing all "Version 2" problems. Everything and the kitchen sink gets included into Version 2, and it ends up worse than Version 1.
    7. Hardware costs less than developer time, so throwing hardware at the performance problems is often easier and cheaper.

    --Coder

    1. Re:Language is not the problem... by Gr8Apes · · Score: 1

      I'd say that's a nice retort to blaming the languages for the low-quality devs, you missed a couple though: both languages allow incompetent code monkeys to fill out features without killing systems, usually, and business, above all, wants cheap development for features. So this compounds their other mistakes, where they just don't hire those good architects / programmers, because they cost too much. Why pay 100K for a dev when I can get a team of 10 offshore devs for 80K? Surely that team of 10 can outperform a single 100K dev? Well, no. Not if you hire a decent dev. (100K chosen because it's a reasonable round number - 80K is from an actual project I was on once) Needless to say, the team of 10 failed to deliver in 6 months and the work was done from scratch in 40 days by 2 devs, because they added the work on top of what they were already doing.

      This isn't the only anecdotal reference to outsourced failures I have. I've not seen any success stories where the offshoring saved money and time, or even got partial functionality in a workable system delivered on time. In almost every case they would have been better off having local devs. The remaining cases should have been cancelled or completely redefined before start.

      --
      The cesspool just got a check and balance.
    2. Re:Language is not the problem... by coder111 · · Score: 1

      Having entry level developers deliver features without destroying the entire system is a good thing, not a bad thing. You cannot always hire the best of the best, and you sometimes have to make things work with mediocre devs. While they would completely ruin everything in C/C++, with good team leadership and resasonable architecture they can get non-critical bits developed in Java/C#. This is speaking from experience- I had previously hired bright but inexperienced students, and they were quite successful in getting things done with Java.

      And outsourcing is not always the issue. I'm looking right now at what is probably the worst system I've ever seen in my career, in London, that was entirely developed in house with higly paid developers (this is a financial institution). There are plenty of incompetent well paid developers, and even having a reasonably OK team won't save you if management is incompetent.

      --Coder

    3. Re:Language is not the problem... by Gr8Apes · · Score: 1

      It all depends on your view. I'm not against entry level developers, I just don't believe it's effective to use them in new development. Ever. It takes longer to convey your needs than it does to do it yourself. Unless you're investing in them to ramp them up to mid-level devs as fast as possible and account for that in your timeline. I have done that, but it's definitely a hit to the timeline, especially for smaller teams. You can also sometimes use them for smaller end components if they're closer to mid-level.

      I agree fully with your incompetent management statement - even the best architect can be screwed by them, if they're ham-strung by stupid decisions (Using Documentum as a relational DB comes to mind from one case I know about). And I never stated that highly paid devs are good, only that poorly paid devs are almost universally bad, especially when it comes to outsourcers, offshore ones specifically. I qualified my statement since there's probably a poor sap out there somewhere that's poorly paid and not bad, and for whatever reason hasn't yet sought a new job.

      --
      The cesspool just got a check and balance.
    4. Re:Language is not the problem... by coder111 · · Score: 1

      Wow, coincidences.
      I have worked for a place that used Apache Jackrabbit as a database. It was mostly done to work around a DBA who was an ass, because Jackrabbit didn't count as a real database and could be managed by the dev team. I spent 1 year in there porting that system to Microsoft SQL. Not my choice of database, I pushed for Postgres. But even MSSQL worked much better than Jackrabbit. That refactoring effort was very successful, but I got headhunted soon afterwards for a much better salary, and even crappier system to work on :)

      Anyway, best of luck :)

      --Coder

  39. XML documentation by devent · · Score: 1

    IMHO one of the worst aspects of C# is that Microsoft have decided to use XML for documentation.
    I've already complaining a lot to use HTML for Javadoc in the source code, but XML is so many orders of magnitude worst.

    I understand why Javadoc is using Html, because Html is hipp and modern or whatever.
    But there are so many better altrenatives. For example Textile.

    At least with Javadoc they saw the trouble and introduced tags:

    @author
    @version
    @since
    etc.

    It's already difficult to write and read Javadoc comments:

    /**
      * <code>JPanel</code> is a generic lightweight container.
      * For examples and task-oriented documentation for JPanel, see
      * <a
      href="http://java.sun.com/docs/books/tutorial/uiswing/components/panel.html">How to Use Panels</a>,
      * a section in <em>The Java Tutorial</em>.
      * <p>
      * <strong>Warning:</strong> Swing is not thread safe. For more
      * information see <a
      * href="package-summary.html#threading">Swing's Threading
      * Policy</a>.
      * <p>
      * <strong>Warning:</strong>

    But to read or to write C# XML comments you have to be really a masochist.

    <summary>
    btnImport control.
    </summary>
    <remarks>
    Auto-generated field.
    To modify move field declaration from designer file to code-behind file.
    </remarks>
    <list type=""table"">
    <listheader>
    <term>Employee</term>
    <description>Employee Type</description>
    </listheader>
    <item>
    <term>XXXX</term>
    <description>Administrator</description>
    </item>
    <item>
    <term>YYYY</term>
    <description>User</description>
    </item>
    </list>

    PS: Filter error: Please use fewer 'junk' characters. with the XML stuff.

    --
    http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    1. Re:XML documentation by shutdown+-p+now · · Score: 1

      Note that this is not a part of the language itself (a comment is a comment). You can use Doxygen with C# if you really want.

      Though I agree that the "standard" syntax for doc comments could be thought out better. On the other hand, the nice thing about XML is that it's an "Extensible" Markup Language. Which is to say, you can use any custom elements that you want in your comments, and the compiler will extract them into the .xml file when it compiles your source code, alongside with other stuff that it does understand. Then you can write custom tools that post-process the binaries, or do various other things, based on that XML.

    2. Re:XML documentation by devent · · Score: 1

      First of all XML is text. I can write any tool I want that can parse text and call it "extensible".
      The "extensible" part have nothing to do with XML but with the tools that parse the XML text.

      We just need to agree on a definition how to write the "extensible" part. In XML it is done with a begin tag and a closing tag. That have mostly to do because with a begin tag and an end tag it's very easy to write a parser. Just like all C-like languages are using { and } to mark blocks. In Python for example, a block is with whitespace. So in Python it is a little bit more difficult to write the parser, but you can see that the "extensible" can be anything.

      Which life you want to make easier? With XML you make the life of the XML parser developer more easier, but the life of the user that have to write those XML is a nightmare. I propose to make the life of the user that have to write and read the source code easier. Because the ratio is like 1000000:1 user:tool-developer.

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
  40. Re:I hate them both - me too by Anonymous Coward · · Score: 0

    No, but an encapsulation feature.

  41. Tiring ... by angel'o'sphere · · Score: 1

    Someone compares A with B and claims that one of those lacks featers the other has.

    Then a lot of people give comments how A and B both lack even more featers.

    The only thing you clearly understand as someone who *actually* used BOTH *extensive* is:

    The people who claim A is better don't know much about B ... e.g. recently added featrues etc.

    The people who claim B is better usually don't know much about A ... as we obviously don't use it.

    Example: in what practical purpose is there any significant (if at all) difference between Java Generics and C# Generics? From a programmers point of view: there is none at all!

    Ofc the .Net IDE is superiour to Eclipse, IDEA IntelliJ, Netbeans ... we all know that.

    Windows forms is much better than Swing, seriously! (Did you ever do a big App in *both*of them? Likely not, so your statement is not valid). That was sarcasm ... btw. Swing is one of the best GUI Frameworks ever written, only topped by Qt.

    Anyway, there are only a few people who indeed work with both platforms/languages intensively. Those might care about a comparision.

    No one who read this comparision or this article about it or my comment here will switch.

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

      LOL the .Net IDE better than Eclipse of intelliJ. Are you fucking retarded? LOL

  42. Re:I hate them both - me too by angel'o'sphere · · Score: 1

    The private modifier *is* a security feature, and in Java you can set up a SecurityManager that prevents you to use introspection/reflection to accessing such a field.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  43. Rather, compare JVM to CLR by haapi · · Score: 1

    In recent posts about implementing languages like Clojure over .NET's virtual machine (and why those projects tend to atrophy and die), the point was made that C# has a very good compiler, so the VM running underneath need not be as powerful as compared to what the JVM offers.

    --
    Well, apparently, you only have to fool the majority of people for a little while.
  44. JRE Sucks by Anonymous Coward · · Score: 0

    Every new version of Java breaks every enterprise application I work with including Oracle's own shit. Supporting Java is one of the biggest nightmares for any large organization especially if you have macs.

  45. Re:I hate them both - me too by RightSaidFred99 · · Score: 1

    Lolwut? The private modifier is not a security feature, it's to enforce build-time encapsulation.

  46. Re:I hate them both - me too by angel'o'sphere · · Score: 1

    I suggest to read a book about security then.
    How do you plan to ninja my private RSA key on a JVM, when it is hold in a private variable? Hint: you can't!

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

    Shut the fuck up, you stupid piece of shit.

  48. Re:I hate them both - me too by Anonymous Coward · · Score: 0

    Stop. Just stop. The stupid is burning my face.

  49. This is the best explanation of C# async/await by benjymouse · · Score: 1

    Thanks!

    --
    Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
  50. Re:I hate them both - me too by sourcerror · · Score: 1

    I suggest to read a book about security then.

    You go first.

    Private modifier is not a security feature IN ANY LANGUAGE. Neither in C#, neither in Java, neither in C++. C# reflection can read private fields just like Java. To have any kind of security, you mustn't allow untrusted code to run in your JVM/CLR.

  51. Re:I hate them both - me too by angel'o'sphere · · Score: 1

    If configured correctly you CAN NOT read private fields in Java.

    Hint: Security Manager.

    Obviosly, you have no clue about JVM security mechanisms ...

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  52. Re:I hate them both - me too by sourcerror · · Score: 1

    And it is not configured that way by default neither in the JVM or the CLR.

  53. Re:I hate them both - me too by angel'o'sphere · · Score: 1

    It is, e.g. when an Applet is run.

    In a standard JV which I start by typing "java.exe" (or just "java") it is not configured, as it it up to the Java Application that I run to decide if it needs security features or not.

    My point is: with java bytecode you can not access private attributes or methods (of another class). You can only do it with reflection and only if you know what you are doing (setting the 'access private' flag). Reflection however can easily be disabled by a security manager.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.