LWN.net Logo

The downlow on Mono (NewsForge)

NewsForge talks with Erik Dasque, the senior project leader for Mono. "Dasque: I think a lot of people view Mono as a .Net clone, and I think it goes well beyond that. I think the fact that it's a .Net implementation is great. It's a means to an end. But our goal was not to create a .Net implementation. Our goal is to deliver a development platform that works for Linux, that is what Linux needs to kind of go beyond what it has achieved to date."
(Log in to post comments)

Hmm....

Posted Jul 16, 2004 17:13 UTC (Fri) by sean.hunter (subscriber, #7920) [Link]

Its amazing that Linux got so far without a development platform that works.

A development platform that works

Posted Jul 18, 2004 2:41 UTC (Sun) by simon_kitching (guest, #4874) [Link]

I'm very happy that the Mono team have created this software.

I mostly work in Java, but occasionally have to drop back into "c" for some tasks. I'm fairly experienced at programming in c, yet always find it a frustrating experience. I would say that in most cases I can achieve the same task in about 1/3 the time using Java.

I'm not claiming that Java is a perfect language. However the benefits of an object-oriented language, garbage collection, good reflection/introspection facilities and a consistent system library together provide real benefits.

C# + the CLI runtime is very very similar to Java + a JVM. So I would expect developers using mono to experience the same productivity boost.

Clearly, some tasks (such as kernel development, shells, core system libs like glibc or X) are best done in c/c++. But I strongly believe that projects like Dia or Evolution or Epiphany or Planner would make much faster progress if they were written in C# or Java or basically anything with better developer support than C. I really admire the progress that these projects have made with C as their implementation language, but can't help imagining where they *could* have been by now.

Let's consider an example: Planner has been a work-in-progress for many years now. And it's still nowhere near the stability or feature-set of Microsoft Project. But imagine where it would be if its developers could have had their productivity increased by 300%.

Mono could well provide this boost. And Java + native bindings to stuff like GTK, KDE and POSIX could be another contender, though Sun's refusal to open-source Java is a major handicap.

Using Parrot (www.parrotcode.org), code written in Python, Ruby, Perl, and possibly in Lisp, Scheme, etc. will be feasable development languages for applications too.

I think that c will always be the best tool for *some* tasks, but that its days as the dominant development language for applications are numbered - and with good reason.

A development platform that works

Posted Jul 18, 2004 6:36 UTC (Sun) by tzafrir (subscriber, #11501) [Link]

perl, python, etc. are nice languages for prototyping and for writing code fast. Their syntax allows the programmer to be much more productive. So what has Mono to add here that was so lacking?

perl, python, ruby, lisp, smalltalk, and the lot work *today* with their own VM. A universal VM does not add much here. Surely not in terms of performance. And if the code is available, you could always build optimized binaries for your system.

A development platform that works

Posted Jul 18, 2004 23:54 UTC (Sun) by simon_kitching (guest, #4874) [Link]

There's two basic programming philosophies : static typing (eg c#/java) and dynamic typing (eg perl,python,ruby).

I'm not sure myself which will prove more productive in the long run.
Personally I love Ruby. But static typing has some very useful benefits.

For those people who like static typing in their programming language (and that's the majority), they have:
"c" (though type support is not great)
c++
Java
C#

As I said in an earlier post, I think the time of "c" for general app development should be over. It's done good service, and still has niche uses, but general app development can be better done in other languages.

C++ is evil. It's like a samurai sword - very effective in the right hands, but not something that most people should be allowed to play with :-). Its learning curve is also very steep, and open-source works best when it is easy for new developers to enter the community.

Java "coulda been a contender". It still might, given decent bindings to POSIX, Gnome, KDE, etc.

C# running on Mono seems to me, however, to be the best option for development at the moment. It has:
* an ECMA standard language
* good bindings to all POSIX functionality
* good bindings to Gnome functionality
* good mechanisms for adding bindings to other stuff
* support for library versioning
* garbage collection, exceptions, reflection
* JIT or precompile support
* The ability to distribute apps without source, for people who
want to develop proprietory code.
* good native libraries (xml parsing, web services, etc)
* no "make" hassles

and:
* a (mostly) common language between windows and unix development.
I say mostly, because learning the system libraries is part of the
job of learning a language, and development on windows/unix will
use some different APIs.
* simplifies the porting of c# or vb apps from windows <-> linux.
* a "windows compatibility" module which allows some windows apps
to run on linux without recompilation.

Whether the "windows compatibility" bit continues to work depends on Microsoft. They could potentially declare patents, or just make sneaky internal changes to windows libs to prevent this. But they can't take away the other benefits of Mono, because it's an implementation of an ECMA standard.

Most importantly, Mono is not a ".NET" port. It's an excellent development environment that just happens to be similar to Microsoft's development environment. It was invented by a small team of very smart people, led by the main designer of Delphi. They happened to be employed by Microsoft at the time, but that's no reason to ignore the fine work they produced.

Is there any other statically-typed development framework available for Linux that can provide anything near this?

The only downside to Mono I see is that, as far as I know, it doesn't have Java's concept of a "security manager", meaning that code can't be run in a "sandbox". This is a very cool and powerful concept. If Mono does support "sandboxes", please let me know!

The above probably sounds overly opinionated. I just couldn't be bothered putting "I think", "probably" and "it currently seems to me" all through it. If you have a different view on any of the above, I'm interested - please argue the point!

A development platform that works

Posted Jul 22, 2004 14:20 UTC (Thu) by massimiliano (subscriber, #3048) [Link]


The "sandbox" you're asking for is CAS (Code Access Security),
and it is being implemented in mono (disclaimer: I'm in the mono
development team).
Expect a mostly complete CAS implementation in the next release...

Ciao,
Massi

A development platform that works

Posted Jul 19, 2004 0:11 UTC (Mon) by simon_kitching (guest, #4874) [Link]

Here's some of the differences between developing in Perl/Python/Ruby and Mono:

* As far as I am aware, you can't distribute a Perl/Python/Ruby app without the source. This essentially rules out all commercial development in these languages. Even if there were some way to distribute some kind of "bytecode", reverse engineering of these languages will provide quite a lot of info due to the requirement for "late binding".

* Performance. Whether this matters depends upon the application being developed. But in general, c# and Java are getting quite close to c/c++ performance these days while dynamically-typed languages are a long way behind.

* Lower "mindshare". I expect in the future that the number of c# programmers around will outnumber the perl/python/ruby developers simply because c# is the "normal" development language for windows, and a good development language for unix (mono).

* Problems with runtime version compatibility. Python, Ruby and Perl all evolve reasonably fast, and the compatibility between different releases isn't always great. So installing apps written in these languages can be more complex than it needs to be.

Despite this, I agree with you that Perl/Python/Ruby are good development languages for many apps, and I think a number of projects currently being done in "c" would make much better progress if they changed to using one of these languages instead.

A development platform that works

Posted Jul 19, 2004 20:04 UTC (Mon) by man_ls (subscriber, #15091) [Link]

<blockquote><i>
As far as I am aware, you can't distribute a Perl/Python/Ruby app without the source.
</i></blockquote>
Reverse engineering Java code is trivial: there are excellent bytecode decompilers. Even if you strip symbols (and nobody does that), you get very readable code. You can obfuscate your code, but even less people do that. Not to speak about JSP's or similar approaches. Yet I don't see anyone caring about it. Why is it a problem with Perl / Python /Ruby?

A development platform that works

Posted Jul 19, 2004 20:13 UTC (Mon) by man_ls (subscriber, #15091) [Link]

Damn. Bad format, sorry about it.

Dynamically-typed languages vs statically typed languages

Posted Jul 21, 2004 2:28 UTC (Wed) by simon_kitching (guest, #4874) [Link]

True, decompiling java produces significantly more readable results than decompiling c or c++.

However AFAIK decompiling java:
* loses comments
* loses local variable names
* loses method parameter names
* inlines constants (eg "3" rather than Colour.RED)

I know that the compilation process also effectively converts exception-handling try/catch/finally clauses into a bunch of GOTOs. Maybe a really smart decompiler could reconstruct the original intent...

For a dedicated software pirate, decompiling the original code would be useful. But it's definitely not the same thing to say that java bytecode decompilation is the same as having the source code.

It's also hard to say that someone has been improper by looking at your application's code when you distribute the source. In fact I seriously hope that this would *never* be considered illegal.

But if someone has decompiled and trawled through the code of an app distributed under a proprietory licence, that is far more clear-cut.

And in the end, I know that I would never get permission from my employer to ship the source to our commercial apps. But we ship java apps. So if decompilers really are as effective as you say, *please don't tell him* :->

Dynamically-typed languages vs statically typed languages

Posted Jul 21, 2004 8:00 UTC (Wed) by man_ls (subscriber, #15091) [Link]

I was using a zero-cost but proprietary Java library once. When I started having problems with it, I decompiled it to see where the error was. Then I realized that I needed to add some features, so I added them to the reverse-engineered code and recompiled. Then I got bored with it and switched to an open source library.

My company never shipped the product, so I guess we did nothing too illegal. The point is that it is quite feasible to do this in Java.

So if decompilers really are as effective as you say, *please don't tell him* :->
This will be our little secret :)

The downlow on Mono (NewsForge)

Posted Jul 16, 2004 18:44 UTC (Fri) by allesfresser (subscriber, #216) [Link]

The hubris blitz continues...

The downlow on Mono (NewsForge)

Posted Jul 17, 2004 14:24 UTC (Sat) by louie (subscriber, #3285) [Link]

Take Joe Barr with a grain of salt... 'senior project leader' in this case means 'product manager.'

Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds