this post was submitted on 31 Mar 2026
105 points (98.2% liked)

Programming

26309 readers
569 users here now

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

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

Roughly a year after the effort was announced, the Apple-developed coding language, Swift, has just launched support for Android.

you are viewing a single comment's thread
view the rest of the comments
[–] schnurrito@discuss.tchncs.de 18 points 21 hours ago (1 children)

What's your problem with it? I read parts of the documentation and it seemed like a very elegant language combining good features from many other languages.

[–] Solemarc@lemmy.world 11 points 14 hours ago (2 children)

This is true for basically every language though. If you read the documentation for c++ it doesn't sound like the work of the devil. You only learn that after you start.

[–] setsubyou@lemmy.world 10 points 12 hours ago (1 children)

Swift is a modern language that offers good performance paired with a lot of safety features you’d otherwise go to Rust for (type safety, memory safety, concurrency safety,… although memory safety based on ARC is slower than Rust’s approach, and Swift makes it easier to disable safety features). Personally I like it more than Rust because the syntax is a bit cleaner and it has exceptions.

The problem is, using it on e.g. Linux is a completely different experience from using it on Apple platforms and it doesn’t really transfer over. Apple devs will use Xcode and all the Apple tooling and will get used to Apple APIs. On Linux you don’t have Xcode, you rely more on Swift Package Manager for dependencies than on Apple platforms, you suddenly have to learn what part of the libraries you’ve been using are Swift standard library and what parts are Apple only or are from the Objective C runtime that’s not used on Linux, and the ecosystem is much smaller.

A lot of things that also mean that code written for Apple doesn’t often work on Linux unchanged, not because of Swift as such, but e.g. before Swift had Regex you’d use the one from Objective C, which just works on Apple, but isn’t there on Linux.

I haven’t tried it for Android development but I imagine it’ll have similar issues.

[–] Solemarc@lemmy.world 0 points 11 hours ago (1 children)

I mean, this sounds like less of a headache then my latest attempt to setup rust in native windows (hello linker errors).

That being said, "the tool chain is a pain in the ass to setup" is a real problem IMO. MSVC makes me want to jump out the window every time I'm forced to use it at work.

If you're going to cause me more of a headache then go/python/zig to setup (which is basically none) I'm very quickly going to look for an excuse to stop using you.

[–] arthur@lemmy.zip 1 points 6 hours ago

For rust the cross compilation may be useful, if you need a windows binary but can write te program in Linux.

[–] quips@slrpnk.net 0 points 12 hours ago

So again what’s the problem with swift?