[Mono-list] Philosophical Question - Why .NET on UNIX?

Jonathan Pryor jonpryor at vt.edu
Sat Jun 23 17:12:11 EDT 2007

To take a point-by-point reply...

On Sat, 2007-06-23 at 11:24 -0700, mike montagne wrote:
> If the members don't mind, I'd like to ask the forum a question or
> two. I come from a Delphi and C++Builder background, and was long a
> holdout on .Net because of severe performance doubts. Now that I have
> been working in .Net/Windows, the performance concerns have proven so
> obstructive to achieving acceptable performance standards that the
> principal work I intended cannot be carried out in .Net.

*Actual* performance problems, or *concerns* (i.e. thinking) about
performance problems has prevented you from using .NET?  You should
clarify this.

> I also have great concerns about the real security of .Net
> implementations (which make me question why anyone would ever
> want .Net to run on UNIX systems). 

As opposed to the buffer-overflow filled security problems in C and C++?

Further, as Robert Jordan mentioned, Mono hasn't fully implemented all
of .NET's security features yet either.  Mono prevents the managed
buffer overflows (IndexOutOfBoundsException, anyone?), but I wouldn't
want to use it to run web-applets just yet...  (Though Moonlight will
help with this as it uses a simplified security infrastructure.)

> If C# compiled into native Linux and OS X executables (of course,
> relying on supported libraries), I would be a happy camper. But as
> this is not the case, this is my question:

There's always mkbundle, which will generate a platform-native
executable which embeds the C# program and Mono, thus creating something
that _looks like_ a native executable...

> Given the presence of X Windows (and the ability to write X Windows
> with the free tools bundled with OS X), why sacrifice speed and
> require the overhead of the extra operating environment on UNIX
> systems?

Oexandr answered this one -- there are two forms of performance,
application performance and developer performance.  .NET provides faster
developer performance (courtesy of the IDE as much as anything else),
and generally provides acceptable application performance.

There are other language choices -- Java, Perl, Python, Ruby, etc. --
but C#/Mono is comparable or faster than all of those.  .NET is
frequently faster than Mono.

So by and large C#/Mono/.NET is NOT "sacrific[ing] speed and requir[ing]
the overhead of extra operating environment" -- unless a GC qualifies as
an "extra operating environment," in which case it's an environment that
most developers will *gladly* accept (see also Java, Perl, Python,

> Personally, I don't buy the "easy distribution/installation"
> arguments, nor the security claims. Delphi and C++Builder ran as fast
> as native C++, and executables could be copied to target systems and
> run there without even using an installation program.

So Delphi and C++Builder have "XCopy deployment."  So they're no better,
just equivalent (once the Mono/.NET runtime is installed, anyway).  (And
we can certainly quibble about the difficulty of installing the runtime
environment, and you'll get the same issue for most other languages --
how does the Perl/Python/Ruby/Java runtime get installed?)

>  It doesn't get any easier than that. You ran strictly approved,
> intended processes, behind a firewall, where they belonged. Allowing
> diverse, inefficient, not-necessarily-known executables to run --
> wherever -- doesn't necessarily make the best sense to me.

Furthermore, we're not advocating that either.  Mono doesn't have the
security infrastructure to handle that.  It *will* handle that with
Moonlight, as it's a simpler security mechanism, but that's for later.
As of NOW, you would be foolish to use Mono to run the equivalent of
Java applets.

So the question is, how does C#/Mono compare performance-wise to Delphi
or C++Builder?  Sadly, no Delphi implementation is listed in
shootout.alioth.debian.org, so we can't compare them.  We can compare
Mono to various other languages, and while Mono isn't the fastest, it's
frequently Fast Enough, which is all that matters for many people.

 - Jon

More information about the Mono-list mailing list