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

    • schnurrito@discuss.tchncs.de
      link
      fedilink
      arrow-up
      13
      arrow-down
      1
      ·
      10 hours ago

      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
        link
        fedilink
        arrow-up
        5
        ·
        2 hours ago

        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
          link
          fedilink
          arrow-up
          2
          ·
          31 minutes ago

          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.