DEV Community

Vala Deserves a Closer Look

Matthew D. Miller on April 01, 2019

This is not really a post about Vala--though I do think Vala deserves a closer look. It is about the general philosophy of evaluating programming l...
Collapse
 
alecaddd profile image
Alex🔥

Hey, I'm the author of Akira and the other apps you mentioned, thank you so much :D
Regarding Vala, I can tell you from personal experience that it was really easy to learn. I have a background in web development heavily focused on PHP, and when I decided to play with some native Linux applications, it was really hard to even understand the basics of Qt or C++.
Vala was a breath of fresh air. A really clean language, way less verbose compared to others, and with a decent introductory documentation thanks to the elementary OS community.
Cheers

Collapse
 
goober99 profile image
Matthew D. Miller

It's awesome that you're building cool things with Vala! I'm thinking of starting a series on this blog of interviews with maintainers of open source projects (sort of like Coders at Work). Would you be willing to be interviewed for the series?

Collapse
 
alecaddd profile image
Alex🔥

Absolutely, I'd be honoured!

Collapse
 
frothandjava profile image
Scot McSweeney-Roberts

You might want to consider learning C# first (if you haven't already), seeing as that's what Vala is based on and there are more learning resources out there for C# than Vala. Then learning Vala is just a short jump.

Collapse
 
goober99 profile image
Matthew D. Miller

I had dismissed C# as a Microsoft thing (maybe unfairly as I had dismissed Vala as a GNOME thing). I solely use (and have since 2004) Linux. I haven't touched Windows since XP. At work I develop code that runs on Linux servers and sometimes Solaris servers.

I know there is Mono and .NET Core now, but I have yet to meet a developer who solely or primarily develops on Linux that uses C#. I'm not saying they aren't out there; I just haven't met one yet.

If I was to get into C#, what is the tooling and ecosystem like for Linux? I've been interested in trying to create a mobile app and Xamarin looks like a cool way to do that, but from what I've read, I would need Visual Studio (not that monstrosity known as Visual Studio Code but the actual Visual Studio), which isn't available for Linux.

Collapse
 
frothandjava profile image
Scot McSweeney-Roberts

Core has CLI focused tooling, so it should be fairly comfortable if you've done anything in ruby or JavaScript in the last 10 years.

From what I can tell, Mono as a tool for Linux development is more or less dead (all the focus is on Xamarin and to a lesser extent Blazor/WebAssembly).

It is possible to build a Xamarin app on Linux (at least for Android) with just the command line and a text editor. I keep meaning to write an article about how to do it because it isn't really documented anywhere. The biggest issue (beyond the lack of documentation) is that there's no IDE support for XAML and a lot of the resources for learning Xamarin is centred around XAML and Visual Studio (I'll start to believe that Microsoft ♥️ Linux stuff when they do a Visual Studio branded spin of MonoDevelop for Linux like they've done with the Mac). I've been playing with F# and Fabulous, which sits on top of Xamarin but uses F# to define the UI.

I don't see C# setting the Linux world on fire anytime soon. But I still think it's worth having some knowledge of it if you want to learn Vala seeing as it's the language Vala is based based on.

Thread Thread
 
goober99 profile image
Matthew D. Miller

F# is really appealing to me, but I had never heard of Fabulous. It looks really cool (I'm a fan of functional programming for mobile development). Unfortunately, like most of the .NET ecosystem, there seems to be no easy jumping off point for me. The first step under Getting started is "Install Visual Studio or Visual Studio for Mac and enable both Xamarin and .NET Core support." If you wrote an article on using the command line and a text editor to build a Xamarin app on Linux, I'd read it!

Thread Thread
 
kivikakk profile image
Ashe Connor

Here's a good starting point for C# on Linux -- dotnet.microsoft.com/learn/dotnet/.... I've been doing a bunch of C# under Linux for work lately and it's been surprisingly enjoyable!

Collapse
 
nineh profile image
Nine

I really loved vala, I especially liked declaring properties with get and set methods in one line. But I eventually quit in frustration:

List types are defined three different ways in three different packages (the best ones are in libgee but they're not supported in Gtk) so you can't pass a reference to a libgee list to populate a listview widget (for example).

I kept getting c errors, valac frequently let bugs through to gcc which dutifully printed unintelligible complaints that bore little relation to my vala code: very scary when I was starting out.

I don't know if this is my fault, but I couldn't figure out how to have a static class member containing a list of all instances of the class to have static methods that operated on all instances of the class or considered all instances of the class, I couldn't find an example of this design pattern, and I don't know if it's a limitation of gobject or reference counting, but it made me sad.

Probably going to come back at some point, maybe when Gtk+4 drops.

Collapse
 
gavr123456789 profile image
gavr • Edited

I kept getting c errors, valac frequently let bugs through to gcc which dutifully printed unintelligible complaints that bore little relation to my vala code: very scary when I was starting out.

It looks like you tried Vala for a long time, I assure you now this is no longer there.

Second
What? Like this?
example

Collapse
 
darkoverlordofdata profile image
Bruce Davidson

I like Vala quite a bit. It's easy to write, and compiles to c, so it runs anywhere. Almost. It depends on Gnome's GLib for it's runtime, and GLib is not very portable. My biggest problem with vala is GNome's lack of interest in it. A couple of years ago they even tweeted out not to use vala for any new projects. Too bad - it has a lot of potential, but little support from it's owners.

Collapse
 
gavr123456789 profile image
gavr • Edited

A couple of years ago they even tweeted out not to use vala for any new projects.

One Rust fun not all GNOME dude. There detailed answer from vala dev.

Also here top GNOME repos ordered by language C: 225, Vala: 44 Python: 32, C++: 18. Link

Collapse
 
darkoverlordofdata profile image
Bruce Davidson

Where he says that Vala is not a real programming language? At least the open source community is giving it more love these days - it gives me hope :)

Collapse
 
yawaramin profile image
Yawar Amin

Just fyi, ReasonML doesn't really have Facebook backing, not in the same way that Google is backing Go or Dart, or JetBrains+Google are Kotlin, or even Facebook backed ReactJS or GraphQL. Reason and BuckleScript teams consist of a couple of people working on the JavaScript compiler backend, a couple of people working on the ReasonReact binding, and a handful of people working on build tooling. Because of the way Facebook works, these people are developing Reason mostly while working on their actual projects, like Facebook Messenger.

Collapse
 
kosmospredanie profile image
kosmosp

Vala is a great alternative to C++, with stable ABI!

Collapse
 
gavr123456789 profile image
gavr

In this case, you forgot to add Vala to learning/trying in your profile.