Alex Rivera | Logout

Programming languages that compile into C/C++ source?

Asked 2011-06-27T20:55:25.567
67

I'm using CoffeeScript to make JavaScript development easier. It's a language with clean syntax that compiles into JavaScript.

So, what are the established programming languages that compile into C/C++ source code, to simplify syntax and/or enhance functionality?

Edit
Report

2 Answers

17

Vala and Genie are languages that use the GObject type system and compile to C code. I've never used them but they look interesting. GObject is the type system used by GTK but I believe it's separable from GTK.

answered 2011-07-07T20:38:17.540
1

One could argue that since most major programming languages are Turing-complete, they are actually equivalent and programs written in them can be translated into each other.

That said, as other people have mentioned, there are quite a few languages for which there are (or used to be, early in their development) backends that produce C code, since that removed the complexities involved in binary code generation from the language implementation. That does not by any means mean (pun unintended) that said code was actually readable - it was just more readable than its compiled form.

As for my contribution to the list, lex and yacc "programs" (if they can be considered that) are typically transformed into C code - a horrible, tangled mess of it, but C code nonetheless...

answered 2011-07-07T21:18:10.530

Your Answer