Slashdot Mirror


Mono C# Compiler Compiles Itself

Bob Smith writes: "Miguel just commited the last patch nessisary to get Mono's C# compiler to compile itself. After 7 odd months, MCS is now self hosting." jbarn adds: "Mono-list email is here."

6 of 339 comments (clear)

  1. Re:Samba anyone ? by MagPulse · · Score: 3, Interesting

    Horrible analogy. Being able to port C# programs written in VS.NET is only a part of the reason for Mono. And MS won't stray far from the ECMA standard, which is what the first release of VS.NET follows. It's taken until now to break free of some legacy "features" like incorrect for-scoping introduced way back in VC++ 4, just for backward compatibility.

    Right now, all Linux has for standard middleware is CORBA. Sure there are Linux die-hards that will stand by CORBA, but most will agree that COM is superior. Now with Mono, Linux will finally have a decent object technology with which to build large OO projects that will work together.

  2. Cautionary Tale by devnullkac · · Score: 3, Interesting

    Well, it's not a tale, really, but don't forget Ken Thompson's musings on the dangers of compiling compilers without knowing their full pedigree: the binary compiler can be a trojan horse factory that inserts weaknesses into programs it thinks should be targeted (e.g. "login"), including copying its trojan generation code into the next version of the compiiler.

    --
    What do you mean they cut the power? How can they cut the power, man? They're animals!
  3. Re:Realitive? by mikera · · Score: 3, Interesting

    A compiler is basically a program which converts a program in a source language (A) to a target langage (B). The compiler itself is written in a language (C) which may or may not be equal to A or B.

    Therefore lot of compilers can never compile themselves, since they are written in a langauage other than the one that they compile. I suspect, for example, that the Visual Basic compiler is written in C++, and therefore cannot self-compile.

    In the case that A = C, the compiler can compile itself assuming that it supports a sufficiently large feature set from the language. This is the point that the Mono project has apparently reached. This is a decent achievement for a complex compiler, since it suggests that the project is getting near to being feature complete.

    You could probably write a self-hosting toy compiler relatively quickly if that was your goal. Especially if you chose a "nice" target language, i.e. something like Scheme rather than x86 assembler.....

  4. Re:Samba anyone ? by NumberSyx · · Score: 4, Interesting

    Well considering the base class library has also gone through ECMA standardisation along with C# I'm not sure you need worry.

    Mono will be implimenting the ECMA spec, so MS an drift where they like.

    Microsoft will stick with the "Standard" just like they did with Java, only this time there won't be anyone to sue them.

    --

    "Our products just aren't engineered for security,"
    -Brian Valentine,VP in charge of MS Windows Development

  5. Re:Request by mikera · · Score: 3, Interesting

    You may well be wrong about the functional languages.

    It won't be long before the overheads of FP will be pretty negligible compared to the increased programmer productivity and software robustness. This advantage will gradually start to overcome inertia in the marketplace and start to make a real impact.

    Also, with the incresing use of Virtual Machines as an execution platform it's going to get a lot easier to use functional languages and integrate them into larger projects. My bet is that something like Haskell will suddenly start to make headlines in the next couple of years on the .NET platform.

  6. C# is not vapor-ware... by Da+VinMan · · Score: 4, Interesting

    If it were I might agree with you for the reasons you state. But, in fact, the "still-haven't-seen-it" C# compiler from Microsoft can be obtained in a SDK from Microsoft at here.

    It's not free "as in speech", but it is free "as in beer".

    Also, I think that, in the end that you're right about "Bill & Co. will definately come out with a way to extend it either by libraries or functionality that will leave Miguel in a constant state of catch-up". Only Microsoft will be smart enough not to touch core functionality, it will be just enough to provide the veneer of portability, which will become a selling point of .NET (and therefore Windows) in the future. What they'll do instead is make platform dependent improvements that either can't be ported, or will be difficult to port. Actually, now that I think about it, they're already doing that. It's called the .NET Enterprise servers. If you're using .NET, it will make a lot of sense to use those products that will require Windows on the server.

    So, yes, .NET is fundamentally a strike against all other platforms. It will be a small consolation to have all your C# code running on your Linux server, only to have it surrounded by .NET Enterprise servers.

    I feel obligated to point out that, while all of this sounds very onerous and hateful, Microsoft isn't doing anything wrong in this area at all. They're simply providing more value on top of their platform than the competition can provide.

    Finally, I think anyone will admit it's nice to have the option to use C# on Linux. C# is turning out to be pretty sweet and I for one would like to have it as a portable language skill.

    *ironic mode on*
    Gee, maybe everyone would prefer that C# would just die and go away? That way, the other leading language contender in the market, Java, could just take the market. After all, it's not under the influence of the "evil corporations", like C# is.
    *ironic mode off*

    At least this is still a fair fight between MS and the rest of the world and at least we'll have a choice.

    BTW - The open source world already has at least two languages that are achieving .NET capability: Python and PERL. Check out ActiveState.com.

    --
    Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!