Are Vala and Genie production ready? [closed]
Asked Answered
H

1

9

I am working with some legacy C code which I need to refactor and generally clean up, to remove spaghetti type programming, adhere to the DRY principle etc.

I was thinking of rewriting using C++, but I don't want to go that far, and would like to remain as close to C as possible (whilst using some OOP concepts [without having to hand code them]).

I recently came across GObject, Vala and Genie. The latter two are fairly recent. Is anyone out there aware of either Vala or Genie being used in production code ?

Last but not the least - is there a list of Pros and cons comparisons between the two languages. I am leaning a bit towards Genie because I love Python and am not too keen on C#, but Genie's (apparent?) insistance on tabs could be a tad annoying in practise - I'd be interested in a list of pros and cons for the two languages (assuming one or both of them are ready for production use).

As an aside, I am developing on Linux, so any windows related issues are not relevant as far as I'm concerned.

Horbal answered 1/5, 2012 at 8:42 Comment(1)
You might also want to consider Objective C, D, and possibly a bunch of other languages similar to "C with objects".Ludicrous
G
10

Unity, the user interface used by all recent version of Ubuntu, uses Vala.

Here is a list of applications developed using Vala. Some of these are part of the default GUI install of some major GNU/Linux distributions.

And as to Genie: It is another language (with Python like syntax) understood by the Vala compiler. So it really is just a matter of which syntax you prefer (In my opinion). Here is a quote from the Genie language guide, that seems to say the same thing:

Genie is very similar to Vala in functionality but differs in syntax allowing the developer to use cleaner and less code to accomplish the same task.

Like Vala, Genie has the same advantages:

  • Programs written in Genie should have have similar performance and resource usage to those written directly in Vala and C
  • Genie has none of the bloat and overhead that comes with many other high level languages which utilize a VM (e.g. Python, Mono, Java)
  • Classes in Genie are actually GObjects so Genie can be used for creating platform code like widgets and libraries where GObjects are required for binding to other languages

If you don't like TAB characters, you can use spaces instead:

[indent=2] //two space indent instead of TAB
init
  print "Hello World"
Guacharo answered 1/5, 2012 at 9:10 Comment(3)
Thanks. I think I will go with Vala. It is still being developed (It seems the last code changes to Genie was done a few years ago).Horbal
The phrasing "Programs written in Genie... to those written directly in Vala and C" is somewhat telling. What level of indirection is introduced by using Genie? I understand that Vala/Genie compile first to C before compiling to binaries, but that sentence makes it seem as though programs written in Genie are first compiled to Vala before being compiled to C, then binaries. Or maybe Swahili in between. I have no idea.Jupon
I checked out Unity's source code, can only see cpp,c,py extensions there.Sandstone

© 2022 - 2024 — McMap. All rights reserved.