Should Qt and KDE apps written in C# be considered Free Software?

    richard dale's picture
    2009
    28
    Jun

    Richard Stallman is giving a keynote talk about Free Software at the Gran Canaria Desktop Summit and I am very much looking forward to hearing what he has to say. However, I just read this short post Why free software shouldn't depend on Mono or C#, and to me what it is saying seems incoherent.

    On the one hand he says that:

    This is not to say that implementing C# is a bad thing. Free C# implementations permit users to run their C# programs on free platforms, which is good.

    So Mono is a Free Software implementation of C# and that seems to be good. But then he says that is isn't a good idea:

    The problem is not in the C# implementations, but rather in Tomboy and other applications written in C#. If we lose the use of C#, we will lose them too. That doesn't make them unethical, but it means that writing them and using them is taking a gratuitous risk

    Umm, so we are to consider Mono as Free Software as long as we don't actually write anything in C#. Well call me baffled, but what I really like about the four software freedoms outlined in the Free Software definition is how unambiguous and clear they are. Yet here is an annex to that definition which is saying that we are to consider software as Free Software except when:

    The problem is not unique to Mono; any free implementation of C# would raise the same issue. The danger is that Microsoft is probably planning to force all free C# implementations underground some day using software patents. (See http://swpat.org and http://progfree.org.) This is a serious danger, and only fools would ignore it until the day it actually happens. We need to take precautions now to protect ourselves from this future danger.

    I am used to this sort of FUD argument from discussions on OS News etc, but to get it from Richard Stallman himself is something else again.

    Are we supposed to lie down supine in the face of utterly stupid patent laws like those in the United States, or are we supposed to actually try to attempt to fight for our freedoms? If Free Software isn't about fighting for freedom, then I really can't see the point, and we might as well just write business friendly 'Open Source Software' (whatever that means).

    Anyhow I'm looking forward to a full a frank discussion about this issue at the conference, as I think it is a very important issue.

    Comments

    Comment viewing options

    Select your preferred way to display the comments and click "Save settings" to activate your changes.
    panzi's picture

    Things that C#/.Net provide

    Things that C#/.Net provide that aren't provided by any open source environment:

    • The CLR enables a lot of languages life side-by-side with implicit bindings!
    • LINQ
    • The "dynamic" type and easy integration of dynamically typed languages in statically typed ones.
    • Design flaws concerning generics in combination with multiple inheritance. (It REALLY bugs me that I can't find the article where this is stated anymore! I thought I bookmarked it. I think it was by a mono developer who discovered a case where unspecified behaviour in C# happens.)
    panzi's picture

    Actually I wrote this as an

    Actually I wrote this as an reply to a comment of aseigo. For some reason it ended up here.

    kamikazow's picture

    Mono = WINE

    Mono is like WINE: It's OK as an compatibility layer to run or port Windows applications.
    However, writing apps that are solely meant for Linux & Co. in C#/Mono is like writing an app with WineLib instead of (e.g.) Qt.

    It's not like Mono/C# offers features never before available on X11 platforms. Qt, GnuStep, and Python are here and well supported. IMHO it's still totally weird that GNOME opted to depend on a whole software stack just for a single app.
    Legal issues aside, Mono always chases MS .NET in terms of compatibility. I don't think that's a healthy environment. Let's say Mono is not maintained anymore. I think that's not too far fetched, because Novell is the only major contributor. Suddenly Mono users are forced to stick with the .NET 3.x feature set, while the majority of .NET devs (on Windows) use e.g. .NET 5.0.
    So instead of advertising .NET as cross-platform solution, just use a real cross-platform solution, which C++ or Python with Qt usually is -- works well on Windows, X11, and Mac OS X (GUI apps with Mono on OSX work really, really bad).

    To answer the question in the headine: C# apps can be Free Software, but it's pointless to write them unless your primary platform is Windows.

    richard dale's picture

    Re: Mono = WINE

    Mono is like WINE: It's OK as an compatibility layer to run or port Windows applications.
    However, writing apps that are solely meant for Linux & Co. in C#/Mono is like writing an app with WineLib instead of (e.g.) Qt.

    I don't understand why you say writing apps in Qyoto using the Qt api, that run cross platform on Linux, Mac OS X and Windows is like Wine. It is taking advantage of C# as an interesting programming language, which is different from C++, Python or Ruby and has its own unique set of features. A developer who learns the Qt api by writing C# applications can easily more to another programming language to write Qt apps in if they want to - I don't see much of a proprietary lock-in effect there.

    If you use Mono to run a Windows WinForms application on Linux, then yes that is certainly comparable to Wine. Whether or not that is a good idea isn't the intended subject of this blog though.

    kamikazow's picture

    I don't understand why you

    I don't understand why you say writing apps in Qyoto using the Qt api, that run cross platform on Linux, 
    Mac OS X and Windows is like Wine.

    You can write Linux apps under Linux, using WineLib. You can, but why would anybody want to? It only adds and additional layer that can have its own bugs, results in higher RAM footprint (--> decreasing the chance for adoption on mobile devices), and updates to the additional layer (= WINE or Mono) can cause the app to break.

    MS is the only entity that defines C#, CLI, and CLR. Just like MS is the only entity that defines the Win32 API.
    Windows/.NET will always have better compatibility to the newest standard version and Mono will always be behind, just like WINE will always be behind.
    That means that using C# increases its adoption. With increased adoption, you might be tempted to opt for the prime implementation. Mono, just like WINE, can be an option to leave Windows, but don't be fooled to believe that Mono ever leads anywhere. Mono is only an unwanted stepchild of .NET. Qyoto is only a stepchild for Mono (GTK# is the official toolkit there).

    It is taking advantage of C# as an interesting programming language, which is different from C++, 
    Python or Ruby and has its own unique set of features.

    So is Objective-C. Why don't you use that one? At least it has the advantage (just like Java) that the prime implementation is 100% FOSS. Mono is not a .NET port, it's just a lagging-behind reimplementation.
    Sun made Java 100% FOSS and Apple uses GCC and LLVM for Objective-C.

    richard dale's picture

    So is Objective-C. Why don't

    So is Objective-C. Why don't you use that one? At least it has the advantage (just like Java) that the prime implementation is 100% FOSS. Mono is not a .NET port, it's just a lagging-behind reimplementation.
    Sun made Java 100% FOSS and Apple uses GCC and LLVM for Objective-C.

    Actually I was a NeXT/Objective-C developer, earning a living off that for 10 years. And I did develop Objective-C bindings for Qt and KDE back in 2000, but they weren't very popular and never took off. But Objective-C is a very different language to C# as it is based on dynamic message passing OOP like Ruby and Smalltalk. I feel for that 'corner of the market' we are covered at the moment in KDE with the QtRuby and Korundum bindings that I also work on. On the other hand, I would personally love to see Squeak Smalltalk bindings for KDE more than I would Objective-C ones, but I just don't think we would have the critical mass of community necessary to make that worthwhile.

    aseigo's picture

    i don't think it's FUD

    it's a complex topic, but i don't think this is FUD on the part of the fsf.

    as a previous commenter noted, the reason why C# is good is because it allows software which other people have written already to run on F/OSS platforms. that's a good thing, when and where it works. basically, it views C# as something more like WINE than like Ruby in terms of acceptable usage. sure, you could write to WINE, but that's not its point in life. unlike WINE, C# is an actual programming language ...

    ... which leads to people writing new F/OSS software using it. and that's where the problems may come in.

    there is a rather higher than zero chance of Microsoft taking advantage of its patents and coming down on C# implementations when and if it feels like it. they have an agreement with Novell, and Novell thinks it covers everyone but Microsoft seems to disagree. and that's their public position.

    however, we don't know for sure. so it's "only" a risk, not an absolute.

    the question is whether or not there is significant advantage to using C# in applications like tomboy. when we have the choice of Python, Ruby and others there is little technical advantage, so it seems pretty silly to take that kind of risk. from a pure risk management perspective, a risk adverse entity would elect to use something other than C# for applications they intend to run as part of the F/OSS desktop stack.

    and that is the fsf's point.

    i do completely agree with you about standing up and fighting for our rights. on the other hand, we don't need to stand in front of the train to stop it. we can go pull the switches which are safely located away from the tracks the train runs on. using C# in F/OSS apps without regard to software patents is like standing on the tracks while trying to work the levers. we can pull the switches from safety, and once we've accomplished that we can then ride the rails rather than stand on them hoping a train doesn't come and hit us.

    richard dale's picture

    Re: i don't think it's FUD

    the question is whether or not there is significant advantage to using C# in applications like tomboy. when we have the choice of Python, Ruby and others there is little technical advantage, so it seems pretty silly to take that kind of risk. from a pure risk management perspective, a risk adverse entity would elect to use something other than C# for applications they intend to run as part of the F/OSS desktop stack.

    I not sure what you mean by 'technical advantage', because the language a particular developer prefers to use is a pretty subjective thing. As well as the language itself, a tool such as MonoDevelop might be another factor in the choice of a developer's language. I don't think there are enough C# applications as a proportion of the Gnome stack, for something like future viability apps like Tomboy or F-Spot to be much of a threat. They are just apps, they can be rewritten relatively easily.

    If there was some infrastructure in KDE or Gnome that depended on C# that would be a different matter, and not the same as having some apps written in C#. For instance, if KDE and Gnome depended on an implementation of D-Bus written in C# then I agree that would certainly be a bad idea.

    i do completely agree with you about standing up and fighting for our rights. on the other hand, we don't need to stand in front of the train to stop it. we can go pull the switches which are safely located away from the tracks the train runs on. using C# in F/OSS apps without regard to software patents is like standing on the tracks while trying to work the levers. we can pull the switches from safety, and once we've accomplished that we can then ride the rails rather than stand on them hoping a train doesn't come and hit us.

    I live in Spain, not the USA, and any attempt by an American corporation to sue European citizens, such as myself, for using reverse engineered software (that is perfectly legal in the EU), would be met with a pretty poor reception. So I don't feel I am standing on the tracks - it would feel more like being up in the peanut gallery in the Muppet Show to me.

    aseigo's picture

    bing subjective

    > I not sure what you mean by 'technical advantage'

    i mean that if the choice was "C/C++" or "C#" then we could line up lots of nice little benefits in favour of using C#. i don't see which benefits C# brings that we don't have in other languages (e.g. short/no compile cycles, more modern OO approaches, safety against things like hand-written memory management)

    > I don't think there are enough C# applications as a proportion of the Gnome stack

    so we just wait until there is? it's Ok to lose only some developer time and cause just a little legal headache? i don't think this really makes sense as a statement when the issue is risk management.

    > They are just apps, they can be rewritten relatively easily.

    do we have that much developer time to burn in F/OSS? are we really willing to take the legal and PR hits such an eventuality would cost us when we have other options in language that are just great?

    besides the issue of "can we afford those resources" the way that such legal issues play out is that if there is a patent issue, then the patent holder grabs an injunction and halts the shipment of products including that software. not a great day for Linux distributions that include it if that comes to pass. given that Microsoft has given warning shots, they may even be able to make a defensible argument that it was knowing violation. either way, at that point the best we probably can hope for is IBM to launch a counter-attack with their patent portfolio .... only i don't know if they care about desktop Linux enough to do so, or if we really want to see the wonderful mess those two in court over IP infringement would be.

    > If there was some infrastructure in KDE or Gnome that depended on C# that would be a different matter

    yes, that would be truly dangerous. right now, it's "only a little" dangerous, and not at all for KDE as we don't have apps written in C#. let's keep it that way.

    there is no compelling reason to use C# over something like Ruby or Python given the risk profile of C#. the only reason to do so is hubris or because we feel like, in a good world, we ought to be able to and so we're going to, nyah nyah to the realities of the legal system.

    > I live in Spain, not the USA, and any attempt by an American corporation to sue European citizens

    i don't think it's Ok to willingly throw our American friends under the bus when we don't have to. i don't think Spain is nearly as important in the technology world as the US is right now, either. and i know for a fact that Europe is not nearly as immune to software patents as some people like to think. (there are patents on software filed there, despite the "no software patent" stance.) to me tempting fate in this manner is foolish bravado when there is ~zero advantage to win in doing so.

    if you wish to use C#, go for it. if you wish to use C# with Qt, go for it. but i think that distributing F/OSS apps written in C#, particularly as a default part of the desktop system, is a foolhardy risk.

    sometimes i think we get so far entrenched in the ideas and ideals of freedom that we demand to exercise our freedom everywhere even where there is little benefit and substantial risk. we can pick our battles better than that.

    kamikazow's picture

    I live in Spain, not the USA,

    I live in Spain, not the USA, and any attempt by an American corporation to sue European citizens, such as myself, 
    for using reverse engineered software (that is perfectly legal in the EU), would be met with a pretty poor reception. 
    So I don't feel I am standing on the tracks - it would feel more like being up in the peanut gallery in the 
    Muppet Show to me.

    Please stop that egocentric attitude. "I'm European and I don't care whether American FOSS users get sued." certainly doesn't help the FOSS movement at all.

    Comment viewing options

    Select your preferred way to display the comments and click "Save settings" to activate your changes.