When comparing Javascript / GitHub Electron vs Vala, the Slant community recommends Vala for most people. In the question“What are the best languages to write a desktop Linux application in?” Vala is ranked 4th while Javascript / GitHub Electron is ranked 17th. The most important reason people chose Vala is:
Vala developed by Gnome Foundation.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Works on Linux, Windows, Mac
Being powered by Javascript, apps build with Electron can be packed to run on all 3 platforms.
Pro Wide spread support
Javascript is a very easy language to learn, and is handy for all manner of other things. There's a good chance you already know it, or that you will need to know it in the future.
Pro WebApps without additional work
If you don't require native features and could write a web app (i.e. a website with dynamic elements), then you could just extend it and turn it into a native app. This means that people just need to type your URL to use you app and may get more by downloading and installing it.
Pro Rich GTK Support
Vala developed by Gnome Foundation.
Pro Fast
Underneath there is C. It makes some stuff easier to write than it would be with plain C code.
Pro Easy Syntax
Vala is syntactically similar to C# and includes several features such as: anonymous functions, signals, properties, generics, assisted memory management, exception handling, type inference, and foreach statements
Pro C compatible API (and ABI)
C programs can use libraries written in Vala, and vice versa.
Pro Good documentation
There is Valadoc and most of the libraries have Devhelp packages.
Pro Well-integrated with C language
Vala itself is compiled to C, therefore it can use the vast ecosystem of C language, with least effort.
Pro Stable ABI
You can write a library with ABI stability.
Pro A general purpose language
Vala is compiled to C and only requires GLib - or even nothing (posix profile)
Cons
Con Low performance
Electron applications use significantly more CPU, RAM, and disk space than applications written in almost any other framework. This results in poor battery life as well as an unpleasant user experience.
Con Backwards incompatibility between versions
Electron is growing and constantly changing, but there is no care whatsoever whether the changes in a new version will break your application or not. Even if you write and maintain one app, changes to how Electron handles JS files and functions will make maintenance of a single app your full time job. Even the development process, programming mindset and tooling changes between versions, so there is no guarantee that your app will even have a proper architecture a year from when you've built it.
Con Very few resources allocated to the language
Only a single person is working on Vala full time. Gnome Foundation isn't allocating sufficient resources to properly maintain Vala.
Con A very naïve approach to the real problem
Vala just adds more complexity to the game. No real benefits in using a 'programming language emulator' for UI code, you may think it adds to productivity but it's just a way to make the problem last longer, reinventing the wheel everytime and worse.
Con Very limited adoption
Vala isn't used in areas other than GTK development, and no major business has adopted the language.
Con Not a general purpose language
Can't use Vala in multiple software development areas.
Con Very limited tooling
Though using Gnome Builder, you can debug it easily.
Con Heavy reliance on GObject
Heavy reliance on GObject types, although Vala can be used without GObject. (posix profile)
Con Not well documented
It already has tons of documentation, even a book about Vala.https://leanpub.com/vala https://wiki.gnome.org/Projects/Vala/Documentation
Con No stable version
No stable version of Vala released for over a decade so far. Means that Vala isn't production ready.