As a programmer who is new to Vala, what is your number one piece of advice to someone who is new to the language?
Generally, Vala is excellent, but the one big gotcha I've found is that either its handling of arrays is very primitive compared to the rest of the language or its documentation has a very gaping hole in it.
Despite a long, hard look through the documentation, tutorials, and Google, I've concluded that:
foreach
and +=
to manually add one array to the other element-by-element.argv[1:-1]
but there seems to be no syntax for equivalent to Python's argv[1:]
, so you have to fall back to something more procedural for that.add
with foreach
and +=
.In any event, knowledge of C will be of great use. Our team is actually considering a progressive revamp and porting to Vala. We have members with strong backgrounds in C#/C++ and this change in direction (over time) will be beneficial to the performance and flexibility of our products.
my advice would be to read the documentation but i personally learned the language by looking at vala code examples:
The official vala tutorial
some documentation
the vala tutorial helped me alot and the documentation page contains alot of useful examples but the one site that helped me most was and still is valadoc.org:
valadoc.org
valadoc will help you alot with the different classes and functions also other librarys.
vala is very c# alike but you will often see java like interfaces too. any experince with C is good because all the librarys around vala is written in C and when calling functions you can almost see all the C code that is right under the surface.
for those people that say vala is too young: vala will continue to bee as young as it is now until somebody makes a VERY big documentation or starts a project as big as QT where thousands of people ask questions everyday.
vala is a little hard to learn in the start because of the bad documentation but don't give up! it's a great language when you have learned it's basics. good luck! and sorry for the bad english :)