Thanks I was staring at the code examples trying to figure out which language it was. Some of the examples looked like C# but then some I could have swore were C++. Took me a minute.
Vala is to me the Dutch of programming languages. A fine language. When I hear it I first "know" it's English, then I know it's Danish, then I "know" it's German.
Which is when I realise is has to be Dutch.
But should I learn Dutch? Even though it's a fine language? Maybe I'm better off learning English and German first. And French. Dutch, and Vala, are too niche.
I wish ElementaryOS, would, in probably this order, would have:
a) used ObjectiveC instead of Vala. Elementary is attractive to to Mac users or admirers. Why not leverage what they know?
b) Exposed their API through some language agnostic mechanism. Heck, spits .NET even?
c) Supported interpreted languages such as Ruby, Python, Perl even.
IIRC I brought this up on some mailing list or other a LONG time ago, but (of course) was met - "Get with the program. Vala is fine."
It is fine, but come on. Everything about Linux (desktop) is niche to begin with. Why jump into a super-niche of a niche?
I don’t think Vala is the problem. The problem is GObject, and if you are tied to GObject, Vala is probably as good as or better than the alternatives. The only language that is clearly better than Vala is Go (better tooling and type system, quite a lot simpler, etc), but its bindings weren’t mature (and still aren’t terribly mature) when elementary kicked off.
Linux really just needs a better GUI toolkit than GTK and Qt, but these things are tremendously complex to build and as shitty as the web is, it’s quite a lot less shitty than these toolkits. This is why I think the ChromeOS model is the right way to go—every app’s UI is a browser app with a local daemon running on the backend, maybe in a container (but do away with ChromeOS’s custom modified kernel and prohibition against native code execution). In the worst case we’re writing JavaScript/TypeScript/etc on a browser instead of Vala on GObject, but WASM may well mean that we can write in any language.
The gobject system that underlies Vala is a language agnostic mechanism. Vala also produces gobject introspection information, so bindings can be automatically generated for many languages, including Python and Ruby. Obviously, that doesn't solve the problem of Vala being a barrier to entry for developers wanting to work on Elementary's core apps.
(I once offended some Dutch friends of mine by calling Dutch "German with a Geordie accent," although when you get down to it, "German with a Geordie accent" pretty much describes English, too.)
GObject is language agnostic in the sense that it’s terrible in every language. You still have another type system and memory model that is different from those of the host language, and you end up writing code that feels only marginally better than writing GObject in C. It’s all terribly disappointing in my experience. GObject has served us well, but if the Linux desktop is to survive, it needs a better desktop toolkit story (I left my suggestion on another comment in this thread).