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."

50 of 319 comments (clear)

  1. 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 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.
    3. 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
    4. 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
    5. 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.
    6. Re:I don't want to be "that guy", however by KingMotley · · Score: 2

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

    7. 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.

    8. 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.

    9. 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."
    10. 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*
    11. 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.

    12. 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.

    13. 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*
    14. 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*
    15. 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

    16. 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?

    17. 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.

    18. 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...
    19. 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.

    20. 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".

    21. 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
    22. 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*
    23. 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
    24. 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
    25. 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").

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

    Damn my Java client!

  3. 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 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

    2. 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

    3. 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.

  4. 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 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*
    2. Re: Critical Bugs by PlastikMissle · · Score: 2

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

    3. 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*
    4. 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*
  5. 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 hsmith · · Score: 2, Funny

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

    3. 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.

    4. 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.

  6. 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 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".
    2. 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*
    3. 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.

  7. 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.

  8. Re:first by iluvcapra · · Score: 2

    2003 called, it wants its article back.

    --
    Don't blame me, I voted for Baltar.
  9. 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.

  10. 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*
  11. 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