Regarding C code generation, C++ compilers were for many years just C
pre-processors like Vala is now. Vala is just younger (and prettier)
language than C++, just give it time and it may grow into a real compiler
like C++ compilers did. Whether we need yet another language is another
matter...
As to Gtk/Gobject and Qt, having programmed a little bit with both,
there's much less difference between Gtk and Qt that with C and C++. If
you know Gtk & C, Qt itself is not a problem, but C++[1] can be. Like
Perl, it's a bit of a line noise compared to better designed languages
(better designed meaning orthogonality etc, not performance &
practicality).
[1] and Qt's moc variant of C++ with its magic defines.
Posted Jun 5, 2008 19:55 UTC (Thu) by nix (subscriber, #2304)
[Link]
The only C++ compiler I've ever heard of that used a C compiler as its
code generator was Cfront (and even that was quite unusual: it wasn't a
preprocessor in any sense, in that it did full translation and just
happened to emit C code: that C could would never contain e.g. any syntax
errors unless Cfront was buggy).
Mark Shuttleworth on the future of Ubuntu
Posted Jun 5, 2008 21:06 UTC (Thu) by oak (guest, #2786)
[Link]
> The only C++ compiler I've ever heard of that used a C compiler as its
code generator was Cfront
I have some faint recollections that some other C++ compilers were derived
from that and then there was also Glockenspiel C++ and stuff using the EDG
C++ frontend like Comeau C++.
> (and even that was quite unusual: it wasn't a preprocessor in any sense,
in that it did full translation and just happened to emit C code:
Yes, sorry my terminology was bad. But isn't this also how Vala works?
Mark Shuttleworth on the future of Ubuntu
Posted Jun 8, 2008 16:03 UTC (Sun) by salimma (subscriber, #34460)
[Link]
Regarding C code generation, C++ compilers were for many years just C
pre-processors like Vala is now. Vala is just younger (and prettier)
language than C++, just give it time and it may grow into a real compiler
like C++ compilers did. Whether we need yet another language is another
matter...
There is a difference: Cfront *defines* its own object model, and because the C code it produces is not supposed to have a stable interface, it's easy to abandon C-code generation in favour of a full-blown compiler.
Vala, by design, targets the GObject type system (letting users write GObject applications much more naturally than writing them in C). I don't think we'll ever get to a situation where valac's backend does not actually generate straight C code..