5 ms·
What problem/niche is this language a solution/fit for? I've been clicking around for 30 minutes now and have yet to find a defining feature that makes it (sign
by remon 3y ago
What problem/niche is this language a solution/fit for? I've been clicking around for 30 minutes now and have yet to find a defining feature that makes it (significantly) more productive and/or robust than Java or C#.
- jakjak123 3y agoAre there any good gtk bindings for C# or Java?
- aidenn0 3y agoI've had good experiences with GTKSharp.
- novagameco 3y agoIt's only available with Mono?
- neonsunset 3y agohttps://github.com/gircore/gir.core https://github.com/gircore/gir.core
- saagarjha 3y agoGTK+
- sampo 3y ago> What problem/niche is this language a solution/fit for? Writing software for GNOME. https://en.wikipedia.org/wiki/Vala_(programming_language) https://en.wikipedia.org/wiki/Vala_(programming_language) https://en.wikipedia.org/wiki/GObject https://en.wikipedia.org/wiki/GObject KDE is based on Qt GUI library, and Qt is C++. GNOME is based on GTK GUI library, and they wrote their own object system (GObject) on top of C. Then they wrote Vala, which updates plain C to be more like C# or Java, so it's easier to work with GObject than by using plain C.
- remon 3y agoAh! That's the bit of context I was lacking. Thanks
- xyst 3y agoProbably some caveats not shown by using GObject over C++ libs for qt
- jll29 3y agoThanks for formulating that context so well - you should ask the Vala people to start their Web page with your 4 sentences, as most who visit the page will ask themselves. I also liked the itemwise comparison with Java: https://wiki.gnome.org/Projects/Vala/ValaForJavaProgrammers https://wiki.gnome.org/Projects/Vala/ValaForJavaProgrammers Defining a new language "just" for the GTK library will likely be responsible for it not taking off that much, even if - as is the case here - the language looks neat. The fact that it compiles to C, which is universally available, and the fact that it is not associated with corporate interests (unlike Microsoft C#/.net and Oracle Java/JVM) could be interesting, but perhaps decoupling things from GTK could have been wiser to get more reach? I mostly develop software libraries nowadays, and the only GUIs are Webguis to interact with REST services, but for those folks that make the Linux desktop a better place, this seems a good way to be more productive than in C. Speaking of which, the Linux desktop needs a re-think: someone should start and re-develop all apps in a much more clean and homogeneous way so that it is obvious what is done how. The existing bag of tools from different decades, inclusive apps from xfig, xlock, xv over LibreOffice/KWrite to gedit/kedit are just an inconsistent mess; even MS-DOS apps managed (at some point) to stick to standard text menus, from EDIT to TurboPascal. https://www.theregister.com/2024/01/24/rise_and_fall_of_cua/ https://www.theregister.com/2024/01/24/rise_and_fall_of_cua/
- dagelf 3y agoI guess it solves for tiny community centered around a clean language, which it has, as well as Linux Distributions and Desktop Environments mostly written in Vala, like ElementaryOS and Pantheon. Related HN post: https://news.ycombinator.com/item?id=32787251 https://news.ycombinator.com/item?id=32787251
- agumonkey 3y agoI always assumed that vala was a main reason why elementaryos was so slick. As in freeing people from accidental complexity to spend their neurons on new ideas and optimizations.
- Maken 3y agoVala compiles to native code, no VM or runtime required other than GTK+.
- iso8859-1 3y agoJava and C# also support AOT now, and the linker should only link code that is actually used.
- neonsunset 3y agoThere are quite a few issues that make any JVM language difficult to use in scenarios like this one, in particular, lack of high quality and low overhead interop and certain low level features like C structs. There is also now an option to statically link native libraries into NativeAOT binaries in .NET, and to statically link NAOT-compiled .NET libraries into existing C/C++/Rust binaries.
- wk_end 3y ago"Now" being the operative word. Vala's quite old; when it came out C# barely existed on Linux. I think these days C# is almost definitely the better choice for whatever you might have used Vala for in the past.
- creshal 3y agoC# on Linux still has some warts, the runtime is massive and most distro-packaged software pulls that in its entirety. (And for extra fun, sometimes multiple versions.) All that overhead sits between your code and GTK, and something like Vala completely sidesteps that hassle. That said, it only really shines for the "gtk based linux desktop" usecase, for everything else the situation flips around, as you now need to bring your own GTK. Occasionally still worth it embedded, but not much else.
- krylon 3y agoThere were a couple of Linux/Un_x desktop applications written in C# back in the day - Tomboy, F-Spot, Banshee, Beagle come to mind. They were pretty good at what they did. But the GNU/Linux camp was rather hesitant to adopt .Net for fear of Microsoft suing people over patent issues. At least that is my memory of it. People wrote replacements for those apps Tomboy -> gNote, F-Spot -> Shotwell, Banshee -> ???, using Vala. Now that Microsoft has made .Net open source, the lawsuit threat seems to be gone (at least for the foreseeable future), but I think the ship has sailed.
- aredox 3y agoBeing to gnome what swift is to macOS
- icameron 3y agoAbout 10 years ago my team was using Vala for a production embedded system because it would transpile to C and cross compile to target the ARM platform. It was a lot easier to write a couple hundred lines of Vala than implement a bunch of high level language features in C. The Vala became a few thousand lines of hard to grok C as I recall.
- deleted 3y ago[deleted]