RMS gets it wrong (C# and .NET suck no matter whose you use)

Saturday, June 27th, 2009 at 11:07 pm

RMS says don’t depend on Mono, because, in summary, there is also GNU’s Portable.NET.

I’m sorry, what? Has RMS ever actually used C#?

About two months back, I started learning C# using Mono and MonoDevelop as my tools. I wanted to use C# so I could effortlessly have my apps run on Windows with no actual work. Mono was kinda fast (compared to Perl, or Python without going hogwild with Pyrex/Cython and such), and was easy to setup and use. I also liked the way the syntax was designed.

A lot of people try to separate the standard libraries in .NET (Microsoft calls them the BCL, Base Class Library) from C# since you use them from every .NETy language, but they are very much part of C#. Without them, all you have is a language you can’t do much with out of the box.

The BCL is, largely, a complete fuckup. Compared to Win32′s C++ APIs that are some of the most hated interfaces ever created, BCL is basically the same thing. A lot of API design in the BCL is designed to imitate or wrap Win32 APIs as to make it easier to port Win32 apps to C#.

However, it also makes it much harder to use C#. The API design is just so infuriating and nonsensical. The BCL is the worst standard library I’ve ever seen for a high level language, and I hate it. It doesn’t matter if you use Microsoft’s .NET, Mono, Portable.NET, or whoever else, they all implement the same BCL specification.

Now, this doesn’t mean just because I think RMS is wrong for saying C# is still a viable language that I also think Microsoft is doing this to destroy Linux overtly.

Hanlon’s Razor states “Never ascribe to malice that which is adequately explained by incompetence,” and Microsoft’s insanity in API design clearly fits this. They didn’t pay Novell to develop on Mono because they wanted to kill Linux… they simply paid them to do it, and the fact that the BCL is designed by clueless morons is independent of this.

However, I did say I liked C#’s syntax. C# is very much modeled after modern Java. The last time I used Java was back in the late 90s, and I hated it because it was slow, it lacked a lot of things that the language has now (such as generics and autoboxing).

After my month of C#, I decided to give Java 6 a try. I easily picked it up because it has the same syntax… but Java has one thing C# doesn’t: a standard library (called the JCL) that actually makes sense and is planned out and has APIs that work well.

RMS should back Java instead of C# because Sun has finally released their chief Java implementation under the GPL license (under the name of OpenJDK).

I actually enjoy using Java after experiencing the horror that is C#, and I encourage people to try Java. Specifically, OpenJDK 6 is much faster than either Mono or Microsoft .NET, it is much faster to develop software (since you don’t have to fight with the JCL, like you do with the BCL), and I think Eclipse (the most popular IDE for Java) is superior to MonoDevelop.

8 Responses to “RMS gets it wrong (C# and .NET suck no matter whose you use)”

  • [...] take back what I said about RMS earlier, he does, in fact, understand Mono and anything related to C#/.Net is unwanted in [...]

  • lummie says:

    Forget .net, mono, portable.net….. put all the effort into parrot.
    http://www.parrot.org
    Write in virtually any language, and share between all. RMS should focus on parrot, then everyone can contribute to linux application development.

  • OJ says:

    You write an article with a title that contains “.. C# and .NET suck no matter whose you use”… then you go on to say:

    * “About two months back, I started learning C#” – doesn’t sound like you have a justifiable amount of experience to even begin to back up your choice of title.
    * “A lot of people try to separate the standard libraries in .NET … but they are very much part of C#” then you go on to talk about Java and the JCL as if they’re separate entities. Tell me how good Java is without it’s JCL.. then you can conclude that Java also sucks.
    “A lot of API design in the BCL is designed to imitate or wrap Win32 APIs as to make it easier to port Win32 apps to C#.” – that’s a blatant stab without backing up your claims. Your two months of “experience” hardly constitute enough to be able to say stuff like that. As Brandon says, the BCL is nothing like the Win32 API to use. You’re talking out of your rear.
    * “However, I did say I liked C#’s syntax. C# is very much modeled after modern Java.” – oh, so it doesn’t suck like your title says? but then…
    * “I actually enjoy using Java after experiencing the horror that is C#” – the horror? so it _does_ suck? Man, make up your mind!
    “OpenJDK 6 is much faster than either Mono or Microsoft .NET, it is much faster to develop software” – but you have only used Mono tools, so how can you vouch for how easy or fast is it to use Microsoft’s .NET tools? Microsoft’s CLR is incredibly fast and consistently outperforms the JVM in many ways.

    Posts like this are just fearmongering bullshit. You fail in an epic fashion to justify your position. Well done for reducing the signal to noise ratio.

    • How is it fearmongering bullshit? The syntax of C# is very clearly Java5/6 inspired, I do enjoy using that syntax, however I am now using it through Java proper instead of Microsoft’s poorly implemented clone.

      Unfortunately, Microsoft did not choose to clone Java’s base classes and instead wrote .NET BCL instead. The syntax of a language can be great without the base libraries being great… Microsoft does steal ideas and concepts all the time, but they never seem to steal the right ones all the time.

      Unfortunately, Brandon is wrong about the BCL. It is most clearly designed with Win32 in mind, most likely to convince Win32 C/C++ coders to shift over to using .NET and lock them in with that.

      At no point have I ever contradicted myself. The syntax of C# (a 99% compatible Java clone) is nice, the BCL is not.

      Also, re: Mono being behind .NET, how do you figure .NET is better than Mono? Mono is a better implementation of .NET than Microsoft’s own is. Just because Mono is the second implementation and its for Linux doesn’t mean you can automatically claim its worse without ever having used it.

      During one of the few times I booted Windows, I tested .NET’s speed and played with Visual Studio Express, .NET’s execution speed seemed to be about half the speed of Mono on Linux, and Visual Studio Express seemed to be more difficult to use than MonoDevelop (which in turn, both are behind Eclipse in usability).

      I don’t mind Microsoft astroturfing on my blog, but at least try to make points that make sense.

  • Brandon says:

    Not really sure what your beef with the Win32 API is. But the .NET BCL is really nothing like it, and far more straightforward than the hodgepodge you get with the Java standard libraries.

    The runtime kicked Java to the curb long ago. They’re chasing .NET’s tail lights, but are just getting farther and farther away. Java 7 won’t even catch up to where C# was two years ago. And with C# and CLR 4.0 on the way…

    @123 –

    C# and CLI are under the Community Promise, meaning anyone can use or implement their own versions without paying any royalties.
    http://www.osnews.com/story/21784/C_CLI_Under_Community_Promise_Mono_Split_in_Half

    • Michael says:

      c# is a hell of a hodge-podge of broken and deprecated api’s. Oh, and there’s no documentation worth wiping your dirty bum with.

      Java’s api’s are consistent and reliable. They took a long time to get there, but they’ve managed.

    • 123 says:

      The “covenant” (and the RAND) do not apply to large portions of .NET (e.g. ASP.NET, ADO.NET and Winforms). This is significant because it means .NET programs which utilise these components will not be (legally) interoperable with systems running Mono. This means there will be great disparity between C# programs on Windows and their ports on GNU/Linux, and this fact will be abused by Microsoft to promote Windows as the “better” system. I speculate it will also have the effect of attracting Mono developers over to Windows, who may subsequently abandon GNU/Linux. It may even represent an actual “IP” risk, if the Mono supporters are not entirely vigilant

  • 123 says:

    RMS actually says the free software community shouldn’t make C# a dependancy of free software systems. RMS is suggesting that Microsoft may one day take away the free software community’s ability to freely use C# implementations.

    Any implementation of the C# standard libraries (.Net BCL) that isn’t explicitly blessed by Microsoft (Microsoft controls C# and the .Net BCL) are in danger of being exposed to patents that covering C# and .Net. These patents are currently controlled by Microsoft.

    While RMS does point out the existance of dotGNU (the GNU implementation of .Net), he also implies that dotGNU is also in danger of possibly being taken away from the community in the future by Microsoft.

Leave a Reply