← Back to team overview

ooc-dev team mailing list archive

Re: standalone compiler

 

In any case, I want to reassure you: the C backend isn't going away. Ever.

Generating C code is (as annoying as it may be for those who work on the ooc
compiler) one of the features that's attracting people. Why ?

   - They can dig the generated source code and debug it easily if
   something's going wrong
   - They can export + distribute the generated source (e.g. via the make
   backend) and it builds nearly everywhere, just needing a decent C compiler.
   - They can use easily C code from ooc and ooc code from C.
   - It makes the transition smoother from  C to ooc (easy to learn)
   - It makes ooc already very portable
   - We benefit from C compiler's optimizations, that they spent years
   developing.
   - Other advantages that don't spring to my mind right now.

So, no worries about embedded platforms. C's not going away.

Amos

2009/6/30 Vincent R. <forumer@xxxxxxxxxxxxxxx>

> On Tue, 30 Jun 2009 13:51:56 +0200, Amos Wenger <amoswenger@xxxxxxxxx>
> wrote:
> > Depending on what you read, it means either the rock compiler
> > project<http://github.com/amoswenger/rock>(in which case standalone
> > means not dependant from Java / self-hosting),
> > either that: currently, generating C files is the only "real backend"
> > that's
> > implemented for the ooc language. However, I had in mind from the start
> > that
> > the language's design should stay flexible enough that we could implement
> > other backends. Before ooc, I had another project, which generated
> assembly
> > code as understood by Nasm, the Netwide Assembler. But for ooc it seemed
> > simpler to just generate C code and be done with it.
> > However, for the future, I'd love to see appear a LibJIT backend, an LLVM
> > backend, and maybe a GNU as backend (the assembler that gcc uses).
> > Implementing such backends would help the ooc language specification to
> > stay
> > target-agnostic. It can only do good, as long as every implementation
> > conform to the standard (still under discussion/construction).
> >
> My concerns is about embedded world, because if one day you provide a
> backend I hope there
> will be first a gcc one, because current toolchain are based on it(wince,
> symbian and iPhone).
> So if a gcc backend exist it would allow to patch toolchains sources and
> provide it for the embedded platforms.
> But for now I think generating C files is a good choice.
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~ooc-dev<https://launchpad.net/%7Eooc-dev>
> Post to     : ooc-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ooc-dev<https://launchpad.net/%7Eooc-dev>
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References