RFC in Comparison between Rust, D and Go

Sergey Korshunoff via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 13 22:31:36 PST 2015


2015-11-11 15:19 GMT+03:00, Walter Bright via Digitalmars-d
> I've looked into generating C code as an output format. I found the problems to
> be endemic and working around them was harder than just generating native
> code:
>
> 1. You're at the mercy of bugs in the C compiler you cannot fix.
> 2. C leaves quite a lot as "implementation defined", causing endless compatibility issues with >  various C compilers.
> 3. C's integral promotion rules.
> 4. Generating exception handling code for C is miserable and inefficient.
> 5. Your compiler is going to be slower than C.
> 6. You'll suffer from endless bug reports caused by a mismatch between your
....
All this problems are not fatal. There is plenty of the "X" to C
translators, even C++. Most interesting for me is Vala. And generated
by Vala C code looks nice. Your point of view is a point of the
translator writer. From the user point having a C generated code drops
all needs to descripe how this or thats is implemented by translator,
a more portable code because a C compilers are written for everything
(8051 for example), chance quickly replace and compare different C
compilers and interpreters as backends, chance to use different C
tools  to transform and analyze a code, etc....

PS: you just say that C is not suitable for the system programming


More information about the Digitalmars-d mailing list