3 ms·
Its in the Java, C# family of languages, where you can do pretty powerful things without the complexity of the likes of C++ and (now Rust) with a very good perf
by oscargrouch 5y ago
Its in the Java, C# family of languages, where you can do pretty powerful things without the complexity of the likes of C++ and (now Rust) with a very good performance.
And when you take the family Swift is in, (now also with Kotlin), i consider it the best language over its peers not only given the design, but the fact that being AOT compiled from the start it's of great value.
Having said that, i feel inclined to invert the question as, why i would not want to use and learn it?
In my experience at least, a lot of IT folks, just don't have the mental energy for the likes of C++ and Rust, but can peak at a language like Java which can already be complex enough.
For instance, i deal mostly with C++ all day, and i don't think i would choose it if i were to create an application with buttons, multi-media, etc.. Nor Rust(same problem as C++) or Go(poor design for that goal). Given there's a language like Swift which combines the design and speed/efficiency to create such a thing.
If i were to create a backend service for instance, i would take Go into consideration, and probably in that case it would be a better fit than Swift or Rust or C++..
So its about being the right tool for the job.
- b3morales 5y agoI'd dispute that you can achieve high performance in Swift without paying a similar Rust/C++ complexity cost. You can write high-level GUI code that is relatively straightforward, but if you are about speed and memory usage, there is a lot of intricate knowledge you need about what things to do and which to avoid.
- oscargrouch 5y agoOf course, if you want a very efficient application, you are completely right. But the thing is that with Swift you can get a Java like performance (which is pretty good) out-of-the-box even while paying the ref-counting penalty, without the Java memory penalty (it has a low memory footprint) and without having to run it all with a external VM. Of course, if you want to catch-up with the average speed of C++ you will need some effort, but knowing that it will be pretty fast without much effort and without all the other penalties is reassuring.