Monday, October 27, 2008

» My opinion of Mono

As it seems like everyone has to voice her opinion on Mono, I'll do as well. First of all, I don't like C# as a programming language. And I think that Anders Hejlsberg is wrong on many things. Not having checked exceptions is ludicrous, recommending to use return codes rather than exceptions because of performance is stupid, and cramming every possible OOP and functional language feature into C# is pointless. I much prefer Java because of its relative simplicity, I rather like its verboseness (Eclipse and NetBeans are there to help with that) and conventions, even though I wouldn't mind closures and some syntactic sugar for lists and maps. I'm a firm believer in semi-statically typed languages with an IDE and a compiler that can throw many programming mistakes at your face, at least for medium to large sized projects. I also like using Python (although a proper block syntax would be a lot better than block grouping by indentation) and Ruby (even if it runtime patching of core libraries is a terrible idea). I even find Perl to be adequate for certain types of things. That being said, back to Mono. I believe that having Mono is a good thing, for several reasons:
  • interoperability: Microsoft has been making a huge push from its patchwork of development technologies (VB, C, C++) to its .NET platform and, hence, most software that will be written for the Windows platform is very likely to be running on the .NET runtime for a foreseeable future. Wouldn't it be great to have a compatible runtime on open operating systems (Linux, *BSD, ...) that was able to run those applications when there is no (better) alternative ? I think it is. For the same reasons, I also believe that having OOXML support in is a good thing too. In "Microsoft shops" (businesses that use lots of Microsoft software) that rely on MS Exchange, Active Directory, MS Office, Windows and MS SQL Server, it's clearly an advantage for Linux to be compatible. If not, you'll never be able to use Linux in such environments, nor push nor migrate.
  • managed runtimes are the future: for most domains, managed runtimes such as the JVM or .NET are the future of software development. Actually, they're already the present, given that a huge amount of software applications are already deployed on the JVM nowadays. Now notice that I said "most domains": it's most probably not adequate for developing a kernel or low-level network stacks.
  • GNOME needs a proper programming environment: get over it, C is a dead cow for developing frameworks and large sets of components. C++ isn't all that great either, but at least it has proper OOP support and is a lot less painful when combined with Qt. Vala ? Isn't that yet another useless language ? I don't think that's a good idea. Python ? It's rather too slow for certain things and lacks static type checking (which I think is a no-go for large frameworks). Ruby ? Even slower than Python, and doesn't have static type checking either (nor proper threading, at least as of now). C# ? Maybe, why not, it's not as good as Java in my very personal opinion, but it's certainly heaps better than C with glib
Anyhow, everyone is free to disagree, I'm not trying to convince anyone. I just wanted to state my opinion, for what it's worth. Note that I left out many fine grained details and nuances, the sort of stuff to discuss around a beer.

Labels: , , ,


Blogger Philip Paeps said...

...I don't think I want to think about writing kernels in C++ or Java...

Blogger nocturn said...

You look at mono and c# from a practical POV, which isn't bad per se.

But when discussing the use of mono and free software, it's important to remember that a move to mono means increased exposure to Microsoft's patent scam. So for the time being, mono and free software are mutually exclusive.

Blogger Loki said...

@nocturn: here we go again with the patent argument. Don't state stuff like that as facts: "a move to mono means" -- what makes you think that is true ?

The software patent system is complete nonsense anyhow, and you're not any less exposed to patents when writing software in C than with C#/Mono. Because of the way that software patents are granted in the USA and in Europe (luckily, they're currently not enforceable in the EU), anyone can be subject to infringe several patents, including trivial code. And I literally mean anyone. In my opinion, given how ludicrous most patents are, every single piece of software is infringing patents. And that doesn't only apply to free or opensource software, it does to everyone. Even Microsoft infringes hundreds if not thousands of patents.

And even though I dislike Microsoft for many reasons, they're not exactly a patent troll (although, arguably, that "IP Innovation" thing is fishy).

It's a dissuasion war, a cold war of patent portfolios, where the big IT businesses (such as IBM, HP, Oracle, Microsoft, Redhat, Novell, Sun) file insane amounts of software patents in order to grow their portfolio to use it as a retaliation threat.

I really don't think anyone is more at risk by using Mono/C# than C, C++, Java, Python, Ruby, PHP, Perl, Scala or whatnot.

Blogger ngrover said...

Nice little blurb. I agree that Linux needs a common run-time. The JVM runs 200+ languages and is on the path to being open-source. Try running Groovy. It is IMO the best of the alternative languages to run on the JVM. It has dynamic typing and many of the functional features of Ruby and friends. It also compiles to byte code that is fully compatible with plain old java. In fact you can mix and match groovy and java together. That way you don't have to throw out your existing Java code and libraries and you can start using Groovy immediately and mix in as much or little Groovy as you like (depending on your knowledge of Groovy or the task at hand).

sudo apt-get install groovy

then you can play with it by running groovyConsole or groovysh

now, if only there were Groovy bindings for QT or GTK. Developing Swing apps in Groovy is very slick.

Blogger Loki said...

@ngrover: I know Groovy, used it a few times already. I'd also favour using Grails over Rails because you can fall back to implement things with Java with the help of huge amounts of existing opensource libraries and frameworks, because it's backed by proven, robust frameworks such as Spring and Hibernate.
Even though I tend to prefer Spring JDBC to ORMs for larger and/or more business-critical applications.
Oh, and for webapps, Apache Wicket is absolutely brilliant.

Blogger nocturn said...


A nice summary is in this article:

Now consider Mono. Like Samba, it aims to reproduce functionality available on the Windows platform, so that people can use free software instead: a laudable goal in itself. But the end-result, which depends on Microsoft's work, is something that encourages developers to write *yet more* code that uses Microsoft's approach. In benighted countries where software can be patented, this means that any patents that Microsoft has in the .NET framework are like to apply to any code developed with Mono. Like an infectious disease, the intellectual monopoly is spread wider

Yes, code written in C or Java can accidently expose you to patent litigation. Mono on the other hand is surely encumbered with the same patents MS holds on .NET

Blogger nocturn said...


And even though I dislike Microsoft for many reasons, they're not exactly a patent troll (although, arguably, that "IP Innovation" thing is fishy).

I missed this one in my previous reply. If you really think they are not a patent troll, then what do you make from their recurring threat of sueing linux distros based on a supposed violation of 235 MS patents which they refuse to disclose?

Blogger Vexorian said...


Aw bullshit, can't believe people still buy this one.

Blogger Vexorian said...

And of course there are patent issues with mono, ask Fedora. Not to mention Novell and MS have announced so multiple times.

Blogger Loki said...

To the bunch of bots that have closed blogger profiles: it is my opinion, like it or not, I couldn't care less. You're free to disagree. Don't even bother trying to convince me, I've been both an user and a contributor in the FOSS ecosystem since quite a long time.

The key is open platforms, open protocols, open formats, not zealotry, hate and lies to "kill the enemy". I don't like Microsoft, I don't like their software and I haven't used it since about 10 years. But "killing Microsoft" ? Eh, please. If people prefer to use Windows, well, let them use it, as long as the protocols, specifications and formats Microsoft uses are open and interoperable with other implementations, including FOSS ones. And as long as people are informed that there are alternatives to Microsoft, including FOSS ones.
If Microsoft produces software under a proper open source license, even better, welcome to the club and to 21st century software development.

After all it's about choice. And I'll stick with Linux or *BSD.

So where's Mono in all of this ? Well, based on technical aspects, it is potentially a way for businesses or FOSS projects to produce opensource or closed source software that is interoperable (in case they prefer not to use Java, for whatever wrong reason). And my point about GNOME is that I personally believe that C# would be a lesser evil compared to the current approach of C with GLib from a technical point of view, but that's just my opinion as a software engineer with 10 years of experience designing and implementing large scale enterprise applications. I completely left any "political" aspect out of that consideration. Because I don't care. I'm not specifically involved into GNOME development nor the GNOME community, so take it for what it's worth: probably nothing.

And if some attention whores want to put lots of words in my mouth and interpret whatever I say as a position of the openSUSE board and/or the openSUSE community, I don't care. People who just believe that sensationalist nonsense should upgrade to a functional cortex.

As a final note, before anyone goes even further on that downhill path: I don't work for Novell, I'm not paid by Novell, I've been a very active contributor to the openSUSE community long before Novell bought up S.u.S.E., spending countless hours and nights during my free time.

Blogger tomCorbin said...

Hey, great article and great replies to your commenters.

I pretty much agree with evvery thing you've said, though I probably like C# more than you do.

I'm a groovy/java type - absolutely love groovy.

But I'd probably be pretty happy doing mono development, except that I have the impression that monodevelop isn't quite as far along as the java IDEs.

Blogger nocturn said...


I don't think you are dishonest, just misguided. I'm in the RMS camp on most Free Software matters and what Novell is doing is not in line with that philosophy.

So I actually do boycott Novell products and I avoid applications written in mono.

BTW, I do not have a blogger profile, my blog is at

Blogger Loki said...

@Vexorian: what's with Fedora ?

Blogger Loki said...

@nocturn: maybe you're the one who's "misguided", see my comment for vexorian above ;)

Blogger nocturn said...


We needed such an initiative to defend ourselves from MS, so that is a good thing.

I still distrust mono as it is not an accidental violation of patents, it's a known violation.

Not that I have a moral issue with breaking patents since I think the very idea is flawed. Yet we shouldn't provide MS with more amunition to point at us when it can be avoided and that is exactly what Novell keeps on doing and I believe Mono is an inherent part of that.


Post a Comment

Links to this post:

Create a Link

<< Home