lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

2011/5/18 Philippe Lhoste <>:
> Why a compiler generating C code isn't a real compiler?
> You are perhaps excluding half of the existing compilers with such remark. I
> find sane to generate portable code that can be compiled by highly optimized
> compilers (like GCC) that targets nearly all common CPU architectures.
> C is often seen, by lot of compiler makers, as a high level assembly
> language...

Well, I agree, my statement is disputable. I know that compilers can
target another programming language like C and they are nevertheless
compiler but the C programming language is made for human. Mature,
well-estabilished compiler often target directly machine code or some
intermediate rapresentation language that is often better suited for
code generation.

Most notable example are may be GNU C++ that was targetting C at the
very beginning but it does changed strategy very early to use directly
the backend of GCC. I know also that Comeau C++ is targetting C to
compile C++ program. While this is absolutely legitimate I just remark
that Comeau C++ has a very small user base and the most widely used
compiler does not produce intermediate C code.

I was also mentioning this about ATS because with this programming
language is incredibly complicated to express even simple program and
it does ultimately end up to produce C code that you may write by
yourself with much more less effort.

I'm sorry this is a little bit off topic and I don't really have
nothing against ATS. My remarks was just to point out how some
decisions of the benchmark game appears arbitrary to my eyes.

But may be that I'm wrong and ATS is a wonderful programming language
that I don't even understand it. :-)