Oh, oh, Mono, it’s so great, really it is, honest

Linux.Ars at Ars Technica currently have up a guide to Mono (no permalinks! if it’s not there, then it might be at this link), going on about how stuff will run on Windows and Linux, and demonstrating how you can do a regular expression matcher in a few lines of code, and a Gtk# app in a similarly short amount. I have two questions, a small one and a big one. The small one is: that Gtk app running on Windows—does it do it if you haven’t installed Gtk on Windows? I bet it doesn’t. Wouldn’t it have been more useful to demonstrate an application which used the native widget set on each platform and didn’t require extra installation stuff?
The big question is: why is this in any way better than Python? Python has all the benefits that they’ve trumpeted about Mono in that article: it’ll run on Windows and Linux (and the Mac, which Mono won’t, not properly), it’s got bindings to a shitload of stuff that Mono hasn’t, it’s got a ton of libraries with it for XML and regular expressions and everything that .net has, and it’s not owned by MS. Yes, yes, perhaps they are going to keep it an open standard and not have some way of using it to bolster their OS monopoly at the expense of Linux. Then again, perhaps they’re not. Since it’s potentially the future of Linux we’re talking about here, I think I’d prefer to play it safe and not use .net. Other people may disagree. So, those of you who think it’s a good idea: please can someone explain to me why it’s better than Python?

17 Responses to “Oh, oh, Mono, it’s so great, really it is, honest”

  1. I couldn’t agree with you more.

    There is something called IronPython (python for .NET) in development though. Maybe eventually we could code in Python, and run it in Mono or not.

    I think eventually Python is going to have to go through a major change, such as stackless python, ironpython, prothon, etc., because it has stagnated a bit. It doesn’t have the metaprogramming flexibility needed by framework designers that ruby or other newer scripting languages have.

    abc
  2. Python has lots of metaprogramming facilities. It might be a little IDE-resistent, but it’s very capable in terms of flexibility.

    Anyway, I think a criticism of Python might be performance. I don’t think that’s necessarily an entirely valid criticism, but it’s certainly out there. And, really, if you want to use Python for application development you end up having to code some pieces in another language. OTOH, Pyrex provides a compelling way to implement static/compiled portions of code.

    Maybe another part is that some people think open source works best when we are playing catch-up—a sort of inferiority complex, even if they won’t admit it. Some people are too dazzled by Microsoft’s power.

    Additionally, Java and C# are modeled on a top-down, restrictive model of development. This is totally not the way open source development works, but it’s the way lots of companies want to work. And there’s justifications of this too; when you are dealing with passionless programmers, and you don’t want to invest in your employees, and you want them to be interchangeable, restrictive methodologies look better.

    And, really, Python has more real momentum than C# and Mono. They’re still just working on infrastructure—Python has been past that for a long time, and if there’s more infrastructure to build (e.g., IronPython, psyco, Pyrex, etc), it isn’t a prerequesite for anything.

    Ian Bicking
  3. >Anyway, I think a criticism of Python might be performance.

    Moore’s Law. Mooooooore’s Laaaaaaw

    Aquarion
  4. Plus you can do something with Python that you can’t easily do with Mono. Write scripts that can update themselves. (It’s a very werid idea but I’ve been think it over for a while).

    Say you need to get information for the DB or a configuration file on an irregular basis (the conf file for instance is read once when the application starts up).

    On start up your application compares the modification time of the configuration file (noce standard easy to modify format) and the configuration module (full of computed constants and stuff you use throught the application) if the conf file is newer it recomputes and rewrites the configuration module. Then imports it (queue compiling). Not often needed but could be useful, and couldn’t be done easily in a compiled language like Mono…

    Of course I could just be gibbering.

    Simon Proctor
  5. permalink to that story.

    Sam
  6. I love Python to! Python is my first choice where possible.

    About Mono … “one” reason to develop Mono is to give current .net developers a future path to Open Source/Linux.

    Ray Smith
  7. “Python has lots of metaprogramming facilities”

    I know all about Python’s metaclasses. I’m saying more can and should be done. It’s not as capable and flexible as other scripting languages when designing frameworks for other users. And this is a much more important criticism regarding Python’s future than speed issues.

    The function decorators (pep 318) that have been discussed the past year will be another step in the right direction. I also would like to see some prothon features incorporated into python, such as the “with” keyword and the more flexible “def” statement: def myclassinstance.myfunc(): …

    abc
  8. I think an important aspect of Mono is the integration of web services. C# and .net were designed with using the same code for desktop and server applications. With mono offering things liks ASP .NET compatability, the benefits become clearer. I am not well versed in python though so I can’t say whether python cannot do some of the things that C#/Mono is supposed to do, but in any case I think the web services aspect is pretty important.

    Eric
  9. C#, Mono, .NET are “better” than Python for the same reason that they
    are better than Perl or Ruby or Lisp—because its “compiled“.

    Screw Moore’s Law. We want “speed“.

    Mark A. Hershberger
  10. What implementation of Lisp doesn’t compile to native binaries? I haven’t seen one in 10, maybe 15 years.

    Python is byte-compiled; for normal usage, I think that C#/Mono/.NET are, too. So the only thing you get out of having an explicit compilation step for C# is … an explicit compilation step. Yay for extra steps?

    kharris
  11. Nobody’s saying you can’t use Python so why all the mono/c# trolling?

    vince
  12. Python sucks, it’s slow and buggy.

    Bill Gates
  13. What’s so special about Mono?

    - Mono makes it easy to cooperate on a project where everybody writes in their favorite programming language. I can’t think of anyones favorite language that doesn’t play well with Mono. My experiences with combining languages in Mono is that it all goes very smooth.

    - Mono makes Python-code run faster than with ordinary Python, using IronPython (The latest IronPython is SharedSource and not libre, but still).

    - Mono makes it easier to call functions in native libraries (like dll’s/so’s), than in Python.

    - Mono produces exe-files (not PE, but CLR-compatible ones), that in many cases can run on Windows without the need to install anything. With Python, it’s a lot more work to produce exe-files (using utilities like py2exe). On Linux, this isn’t an advantage, as Python is equally easy to install (on Debian, at least), but it does make Mono more crossplattform.

    So, the short answer is: Mono is more crossplattform and more language-independent

    Alexander Rødseth
  14. Another thing about this, is that there are so many programmers that just use Microsoft products mainly VS.net. So converting code to Mono is really simple, but to convert it to and train them in Python is a lot to ask.

    Mono, in my opinion, is the greatest threat to Microsoft’s OS. Once corporations see that Mono can let them write GUI 4GL apps on more then just Windows it may be open season on defections to Linux, or hopely OpenSolairs.

    Geek Empire
  15. Now that Python, F# and other excellent very high level languages are available for the CLR, the case for using Mono is stronger than ever.

    The CLR has excellent cross-language facilities that the JVM is going to be hard-pressed to catch up with. The design of the CLR ensures that it is so easy to create a component/object in one CLR language and use it from another. You can write the performance intensive stuff in C# (or Managed C++ if absolutely necessary) and use them from IronPython.

    The other important benefit is the uniform, high level, cross-OS consistent API that the .NET framework provides. This is similar to the benefit that the J2SE runtime provides.

    Wake up developers, we are transitioning away from OS competition nowadays and it is now runtimes such as the CLR, J2SE and Flash/Adobe Air that are competing for our mindshare. The CLR is in fact the most advanced “open” runtime available right now.

    Andy
  16. Maybe not everyone likes python and prefer other language? I think that’s the main reason.

    MS with their CLR and .NET is trying to end language war - let you choose language you like without thinking about pros, cons and compability.

    What we should do ( Open Source ) is to go further and allow programmers not only choose language they like, but also allow them to run their code on Virtually EVERYTHING
    ( all MS os, all Linux, Mac OS, Mobile platforms, and even more )

    Write one code the way you like and run it everywhere with ease - wouldn’t it be nice?

    ev45ive
  17. [...] reading kryogenic’s post about Mono, I must agree. Python, and one could even say Perl, Ruby, Scheme, etc, already offers [...]

    Adventures As Me » Blog Archive » Python not mono

Leave a Reply

OpenID is a decentralised authentication system. If you use LiveJournal or Vox you already have an OpenID; just use the URL of your homepage there. See also how to get yourself an OpenID.