[Shotwell] Vala

Eric Gregory eric at yorba.org
Sun Aug 7 21:14:45 UTC 2011


On Sun, Aug 7, 2011 at 1:03 PM, oliver <oliver at first.in-berlin.de> wrote:

> Hello,
>
>
> I looked at the introduction on Vala
> (just skimmed it).
>
> There it's written:
>
>  - Programs written in Vala should have broadly similar performance to
> those
>    written directly in C, whilst being easier and faster to write and
> maintain.
>
>  - A Vala application can do nothing that a C equivalent cannot. Whilst
> Vala
>    introduces a lot of language features that are not available in C, these
> are
>    all mapped to C constructs, although they are often ones that are
> difficult
>    or too time consuming to write directly.
>
> Both sound very interesting.
> It looks like using C for speed then will not be necessarily.
>
> Can the shotwell programmers confirm/affirm the above two statements?
>

Hi Oliver,

Yes, those two statements are absolutely true.  Vala looks like Java or C#,
but it doesn't require any special runtime and it doesn't have a
mark-and-sweep garbage collector. It uses refcounting for memory management,
and Vala source is compiled to C (valac is technically a source compiler) so
your program or library inter-operates very well with C.

Of course, Vala isn't 100% optimal in all cases. A good analog is hand-coded
assembly vs. a C program. Sure, you could spend many hours tweaking your
assembly code to be perfect, or you could just write it in C and take a
negligible performance hit. Same goes for Vala vs. C.

Hope that helps!

  - Eric



More information about the Shotwell-list mailing list