23

I'm a C# developer who stumbled across a new programming language for linux called vala. It has almost exactly the same syntax as C#, which is awesome. I never really was a big fan of Mono. This allows programmers to write GTK+ apps in a C# style language. My question is: Does vala get compiled into C?

Andy Dent
  • 17,578
  • 6
  • 88
  • 115
Kredns
  • 36,461
  • 52
  • 152
  • 203
  • 4
    Excellent language as ever made is VALA. Many languages has been created by nobody actually keeping the C standards. The only language wrapper VALA is promoting C finally. I hope VALA becomes famous so that we can have a huge community in VALA. –  Feb 19 '12 at 09:28

3 Answers3

31

Yes, Vala is compiled directly to C. From the Vala homepage:

valac produces C source and header files from Vala source files as if you've written your library or application directly in C. Using a Vala library from a C application won't look different than using any other GObject-based library. There won't be a vala runtime library and applications can distribute the generated C code with their tarballs, so there are no additional run- or build-time dependencies for users.

You can read more about it here (and also get tutorials, mailing lists, et cetera). It's quite an interesting project.

John Feminella
  • 303,634
  • 46
  • 339
  • 357
14

From Wikipedia:

Rather than being compiled directly to assembler or to an intermediate language, Vala is compiled to C which is then compiled with the platform's standard C compiler.

Chris Lutz
  • 73,191
  • 16
  • 130
  • 183
11

As John and Chris pointed out, Vala does indeed get compiled to C.

In fact, you can see the generated C code by running the Vala compiler with the -C (or --ccode) flag.

Can Berk Güder
  • 109,922
  • 25
  • 130
  • 137