

Ask HN: Should I learn Vala to develop cross-platform software? - yapcguy

Vala is a C# like language, which compiles down to C.  It uses GObject from GTK+ as it&#x27;s base object class.  For UI programming, the bindings to GTK+ are pretty good.  There are no bindings to QT.  I have been playing around with the language on both Linux and Mac OS X.  While Vala is still a work-in-progress, it is used in production in applications like Geany and Shotwell.  Should I learn GTK+ and Vala or should I use QT and C++ to develop cross-platform desktop apps?  Who has more momentum and is likely to be dominant in 5 to 10 years?
======
dubcanada
This is just my opinion, but...

I don't see GTK and Vala lasting very long. For one, GTK3 doesn't even have a
windows version, there are some random people who made one, but no community
supported windows version. GTK3 is also less popular then QT, GTK3 only being
more popular on Linux. While QT looks better and runs better on both windows
and mac.

I like Vala and GTK and I've contributed to elementary OS for a while now. But
every day they get questions about why they use Vala. So... People don't
generally like it or use it.

But... really use whatever you want. If you like or need C, use GTK. If you
like or use C++ use QT. If you use C and want a little more, try Vala. If you
need Windows or really good mac. Use C++ and QT, or do the backend in C or C++
and platform specific frontend. Even with QT5, Mac users will know, because
certain things still look off

Another popular idea seems to be using HTML and JavaScript for your frontend
with things like CEF.

------
switch33
Learn whatever you want I would say. It's your own choice. But in general it's
good to develop learning a language that is applicable to other software
development. Learning C or C++ for that matter is a lot better because C has a
great relationship to show you what assembly does.

QT also has it's strengths/weaknesses. Try using
[http://libnui.github.io/nui3/](http://libnui.github.io/nui3/) if you want it
may be easier.

~~~
yapcguy
I already know C and have experience with ObjC and some C#. I've gone through
the Vala tutorials, not really too complicated.

I prefer to use a language like ObjC or Vala to do GUI programming, but QT
appears to have momentum (e.g. LXDE porting to QT, Linus Torvalds porting his
diving app Subsurface to QT [1]) which means having to use C++ as the bindings
to other languages are always somewhat lagging.

Perhaps C++11 is better for keeping one's sanity, but I haven't used C++ in a
long time and I never really missed it, so I'm not sure I would enjoy QT and
C++ programming.

[1]
[https://plus.google.com/105872806106213007611/posts/MwiTc3cH...](https://plus.google.com/105872806106213007611/posts/MwiTc3cHKgi)

------
rprospero
Is there any particular reason that you've chosen to limit yourself to just
Vala/GTK+ or C++/QT?

For my current job, I've had to write cross platform GUIs in Python/wxWidgets,
Mathematica, Racket, Tcl/Tk, Haskell/GLUT, LabView, Clojure/Seesaw, and
Perl/Tk. From a longevity perspective, Clojure is the only language that's not
older than Vala by at least a decade.

None of those languages are a silver built and there's a couple I hope that I
never have to touch again, but sometimes using the right tool can save you a
bunch of heartache.

~~~
yapcguy
I build desktop apps for the Mac but want to build cross-platform software
going forward. A native look'n'feel is a bonus, as well as easy deployment. I
also don't want to be tied down to proprietary APIs like I am on the Mac with
Cocoa, Core(Whatever), etc.

From a language perspective I prefer Objective-C, C#, Vala over C++. Personal
taste. Sadly those languages don't have bindings to the toolkit which seems to
have the most momentum, QT. There are third-party C# bindings to QT, Qyoto,
but that requires using Mono which for some Linux users is a no no no.

------
AsmMan2
Short answer: No.(IMHO). What about D? it may be dominant in some years.

I don't seen vala in real world development, a good community about vala... in
fact,I'm not a vala expect, but what are the great vala's features? who is
working on to make this a real world language? and improve it? I don't seen a
good reason to invest in vala language. Just change to something like D.

------
FrankBro
This might be off-topic but if you want to see some good examples, elementary
OS uses it for most of their applications. I tried it a while ago and really
loved some of the features (integrated contract driven programming, yes
please). However, as with most new languages, had problems with availability
of tools, tutorials and libraries.

------
artificialidiot
I see no use of vala code in geany source. Am I missing something?

Vala is not suitable for anything production ready because of its half assed
memory management semantics. I believe it is better to invest in C++11 at this
point than vala. At least, it would be a little bit easier to use libraries
which don't have a binding.

~~~
yapcguy
Apologies, I meant Geary the email client which is written in Vala. Geany is
an IDE which has support for Vala.

