[Mono-dev] New Language Integration
monoman at gmail.com
Mon Jan 11 11:34:54 EST 2010
First answering your latest question: Yes, Monodevelop is mostly written in C#.
Back to what I could understand as your main question:
To write a compiler for a new language that will run on Mono/,NET, you can:
-1- Write it in C#, or another Managed Language. The main advantage
here is to have access to libraries that already do the hard work of
generating the binaries (IL code) that your compiler should produce.
Additionally if you choose C#, you can look at some good compilers
already written with like Mono's own C# compiler (mcs) or Boo's
-2- Write it with some non-managed but well supported language, like
C/C++/Objective-C/Java. It is quite harder to generate managed-code
binaries this way.
-3- Write it with your own language (that was what we at Mono did with
our C# compiler), but that mandates that you have some other compiler
for your language available to "bootstrap" the process (we used MS's
csc in Windows until the point that mcs could compile itself at which
point we switched to use a previous stable version of mcs to build the
For a totally new language, you probably could use a mix of 1 and 3:
build a minimal compiler in some stable language and them use it to
build a compiler in your own new language. That was the intent with
Boo, but AFAIK Boo devs could not find time yet to migrate the
compiler from C# to Boo, itself.
Another take on an educational project, you could use Boo
extensibility features to cook a derived-tailored-improved language
(Boo makes it easy to write DSLs Domain Specific Languages).
Hope it helps,
Rafael "Monoman" Teixeira
"To be creative means to be in love with life. You can be creative
only if you love life enough that you want to enhance its beauty, you
want to bring a little more music to it, a little more poetry to it, a
little more dance to it."
On Mon, Jan 11, 2010 at 7:56 AM, London Disney
<disney.london at googlemail.com> wrote:
> That thread has lots of useful information actually but I might
> have confused you. We use Mono/C# to make addins don't we?
> I like to go a bit deeper to C/C++/ObjC level in MacOSX.
> What I was asking in my first email was something mentioned
> in this page:
> at the end it says "The educational way is an interesting one...".
> I was looking for an "educational" project and so my question
> was if you could show me a road map to get started on something
> like that.
> I am interested in "a compiler for a new language" but
> "Mono VM extensions in C" or
> "improving Mono performance" are also very educational...
> Let me put it this way: How did you write C# itself before it existed ?
> That's what I like to learn.
> I guess my source of confusion is that MonoDevelop is written
> entirely or mostly in C# ? Is that right ?
> On Mon, Jan 11, 2010 at 5:34 AM, Michael Hutchinson
> <m.j.hutchinson at gmail.com> wrote:
>> On Sun, Jan 10, 2010 at 7:47 PM, London Disney
>> <disney.london at googlemail.com> wrote:
>> > @Michael
>> > Hi
>> > I'm not intending to be a Mono user. Getting involved with Mono
>> > and MonoDevelop under MacOSX is what I am after.
>> > I chose implementing a front-end because it can get me involved
>> > a lot -- or may be I'm wrong? This can, say, tell me how to alter
>> > some part of the implementation to suit my needs.
>> > So do you have a better suggestion ?
>> Just to clarify, do you mean a MonoDevelop addin as a frontend for an
>> existing language, or a new compiler?
>> If the former, you may find
>> useful (and the preceding thread on the MonoDevelop list).
>> Michael Hutchinson
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list