Vala Sucks Big Time

Programming issues and discussion
efgee
Expert
Posts: 115
Joined: 29 Dec 2013, 20:58

Vala Sucks Big Time

Postby efgee » 03 Jan 2014, 00:52

Started to code in vala a few years ago when it was pretty new but stopped working with it a short while after because of the shortcomings of the programming language and compiler.
As programming is not my profession I like tools that work because I don't have the time to fiddle around with the shortcomings of a programming language or compiler!

After all these years coding in other programming languages I seem to have forgotten all the pain I had with vala.

Now the memories are back!

It's really a pain when the vala compiler reports no erros but the c compiler stumbles and reports errors.
(valac takes a vala file and generates a c file that is handled by gcc)

Mix on top of that the syntax change of gtk (from gtk2 to gtk3... and from early gtk3 to the newest gtk3).
It's a major pain because parts of the gtk documentation is not up-todate (especially the examples).

The strange thing is that while converting a gtk2 program to gtk3 i had to change all vbox and hbox to box.
When vala is used in oop mode (classes) the syntax is:

Code: Select all

var vbox = new Gtk.Box();
vbox.set_orientation(Orientation.VERTICAL);


Then Murphy's Law kicked in:
all Gtk.Box compile correctly except the last one.

Not the vala compiler sends me an error message but gcc:
two few arguments to function 'gtk_box_new'.

If I change the above code to:

Code: Select all

var vbox = new Gtk.Box(Orientation.VERTICAL, 0);

the vala compiler sends me an error message:
2 extra arguments to function 'gtk_box_new'.

Talk about catch-22.

On December 22, 2013 a new version of the vala compiler was released (0.23.1) maybe this will solve it...
Let's hope for the best.

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: Vala Sucks Big Time

Postby Scooby » 03 Jan 2014, 11:42

What would you suggest for a programming environment for GUI development then?

simargl
Site Admin
Posts: 466
Joined: 16 May 2013, 10:54
Contact:

Re: Vala Sucks Big Time

Postby simargl » 03 Jan 2014, 12:00

I'm like you also not a professional programmer, but would like to see the script where valac reports that error. In GTK3 they suggest using Gtk.Grid instead of Gtk.Box, though Gtk.Box is still supported, it will be deprecated in some of next versions.

https://bugs.launchpad.net/maya/+bug/965469

efgee
Expert
Posts: 115
Joined: 29 Dec 2013, 20:58

Re: Vala Sucks Big Time

Postby efgee » 03 Jan 2014, 19:41

Scooby wrote:What would you suggest for a programming environment for GUI development then?

Please take what I say now with a grain of salt as it is my point of view and your milage may vary...
IMHO:

Code: Select all

Vala > Python
Go   > Python
Go   > Vala

Vala and Go are compiled languages, but Go's compile time is extraordinary short.
I hate Pythons slowness and it's dangling code. :evil:

Go (golang.org) is fairly new but coding is a breeze (at least it accomodates my thinking pattern).
It's not a true OOP language (IMHO OOP is/was overrated) but you can add methods to custom types (cool).
Because its mostly used for services and cli apps there is no official GUI library.

However, there are two GUI implementations that I have big hopes for:
One is with Gtk3: https://github.com/conformal/gotk3
The other one is QML/Qt: https://github.com/niemeyer/qml

Both look promising.

efgee
Expert
Posts: 115
Joined: 29 Dec 2013, 20:58

Re: Vala Sucks Big Time

Postby efgee » 03 Jan 2014, 19:51

simargl wrote:I'm like you also not a professional programmer, but would like to see the script where valac reports that error. In GTK3 they suggest using Gtk.Grid instead of Gtk.Box, though Gtk.Box is still supported, it will be deprecated in some of next versions.

https://bugs.launchpad.net/maya/+bug/965469


I knew that VBox/HBox are obsolete but not that Box will be obsolete in the future.
Maybe that's why Box doesn't get much love from the Gtk/Vala folks... :shock:

Thank you very much for the link.

While converting the Gtk2 code to Gtk3 I will change the Box with Grid.
Let's hope it will pan out.

Thanks again.


Return to “Scripting and Programming”

Who is online

Users browsing this forum: No registered users and 17 guests

cron