54
What to learn next, Swift or Rust
(lemmy.world)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Python actually isn't my first language, just my current choice. I've programmed in Basic, Pascal, Fortran, PL-SQL, Prolog and C at various times in the past. My question was more about which is likely to scale over time to be the more popular ML language.
Python also sucks for MacOS gui apps, so I was contemplating building MacOS/iOs apps for myself as a side quest.
Purely from the standpoint of making GUI apps in macOS/iOS, Swift is almost certainly the best choice. All of Apple’s UI frameworks are written in Swift (technically often Objective-C, but with Swift in mind), and designed to be used from Swift. It’s kind of possible to do this in C++ using Objective-C++, but nearly all of the UI code is going to be Objective-C anyways (Objective-C is the language that used to be the default on Apple platforms, but was replaced by Swift). It’s also certainly possible to use libraries for other languages that wrap this functionality, but these often can be missing features and/or be harder to work with. Additionally when looking for help, you’re likely to find much more support out there for the native frameworks since that’s what most people are using.
OK - well at the end of the day the right approach is to have a problem you're trying to achieve and pick the best language for that (wether you know the language or not).
If it's MacOS/iOS apps, then definitely don't choose Rust. But reconsider that choice for your next project.
Also, with modern large language models, it's even easier to work with an unfamiliar language. And honestly it wasn't ever all that difficult.