Isn't it good that now there is an alternative to C?
Isn't it good that now there is an alternative to C?
It's not exactly the first alternative, GJS (Gnome JavaScript) have existed for a long time and is also a C-like language, so doesn't seem this would give too much value compared to just using GJS, unless you know Swift a lot better than JavaScript but the languages are similar enough that even that doesn't provide much value.
AFAIK, GJS is an official Gnome project too, so there will be a vast difference in ecosystem support compared to Gnome apps written in Swift, which I'm not sure is so popular outside of Apple circles.
Use TypeScript if types are so important for you. Others find their own way of handling those issues without getting tripped up on it. Hardly a reason to completely switch between two languages in my mind, but of course it's alright if it's reason enough for you. Luckily there are acceptable workarounds for both groups of people :)
> Also, GJS is not well documented, as far as I remember.
What exactly is missing here? There are guides for the basics, API reference exists and there is a ton of apps you can look into for inspiration and/or figure out specific implementations.
Is that really worse than what exists for writing Gnome apps with Swift? Seems like a really weak argument for using Swift instead of GJS.
I still don't see how a language (GJS) with an already existing ecosystem of writing Gnome apps, lots of examples, API references and more is worse for writing Gnome apps than Swift, that seems to have been launched just some days ago?
Edit: I realize now that the "Adwaita for Swift" this blogpost is about isn't even an official Swift project, is the output of a student interested in Swift and Gnome.
But that's what so great with programming languages, there are so many that work so differently, so there is at least one language for everyone, no matter how different your brain works :)
By the way, if you're a fan of "conciseness" you should give a lisp-type languages a try if you haven't before, will show you a completely different level of conciseness! Clojure is a great introduction to lisps. And if you still need validation of data somehow, clojure.spec et al works great and will introduce you to some cool new things you probably haven't come across before :)
I mean, you said it yourself:
> One mans gold is another mans trash :) Static typing seems to be a neat addition for lots of people, that's great!
For those people it is definitely better than GJS!
But yeah, probably for some it's worth it, so that's pretty cool :)
Even the gold standard of GTK coding in C is still very undocumented outside of the happy path and confusing due to the Gtk 3->4 migration, and the only approach to learning it is by reading what other Gtk apps do.
Could you explain the nature of problems that occur due to javascrript's treatment of objects? What makes it a big and important issue?
Rust has had endorsed language bindings for GTK for a long time: https://www.gtk.org/docs/language-bindings/rust
Some official Gnome applications are written in Rust.
Swift only supports a small number of linux systems (Ubuntu, CentOS, Amazon Linux) which makes unsuitable for general linux application development.
You seem to have hallucinated that I said that swift cannot be made to run on other systems. You can even make windows-only games run on linux so that is not a surprise.
What distinguishes swift from gcc, clang, python, bash, go, rust, and so on is that languages other that swift aim to support linux in general.
"and so on is that languages other that swift aim to support linux in general." -> again not true linux distro dosen't change swift usage it is just official build is run for few most popular distros and you can use prebuild swift-bin on any linux repo. (arch, debina, ubuntu, centos etc. etc.) You can say the same stuff about rust/nim/go every other language that didn't have official release for some niche linux distro.
Swift here are basically saying they'll endeavour to make sure it works on those particular distros, but in general you're probably going to install Swift on Linux the same way you install rust; via your distro's package manager, and supported by your distro, not the Swift or Rust project.
Notice the [AUR] tag, that means it's in the Arch User Repository, not in the official repository.
https://wiki.archlinux.org/title/Arch_User_Repository
https://wiki.archlinux.org/title/Official_repositories
Slightly ironic given the whole "confidence" side-note you made earlier...
https://wiki.archlinux.org/title/MATLAB https://wiki.archlinux.org/title/Scala etc.
If rustup will be removed from official repo we can argue that rust isn't supported in arch?
As do bindings for Python, C#, Lisp, Scheme, Vala, JavaScript (since GNOME 3)...
There’s this new kid in town, IIRC it’s called C++