News for hackers. Stuff that matters.
Re:Approaches to Type Erasure in Swift (2020) by joshuawright11 on Wednesday April 28, 2021 @11:46AM (#26970700)
Exactly, type erasure has always been a giant pain for Swift but the team has short term plans for obviating it soon.

I think sometimes people forget that Swift is still a relatively new (late 2014, ~7 years old) language. Given its scope and sizable feature set, it's no surprise there are many kinks to work through. Fortunately the team has been cruising and it gets more solid every year.

Right now it's a de facto for iOS and there's a nascent but passionate server community, give it a few more years and I think it'll be a much more attractive for things outside of iOS.

Re:Approaches to Type Erasure in Swift (2020) by skohan on Wednesday April 28, 2021 @01:24PM (#26971879)
> give it a few more years and I think it'll be a much more attractive for things outside of iOS.

I would like for this to be the case, but I'm not so confident. Even a few years ago, you had corporate investment in the form of Kitura and S4TF. Now you have a few small open source projects.

The language itself is ready, but the tooling is just not there. I think the main obstacle is the lack of investment in cross-platform support by the core team. Until I can `apt-get install swift` I don't have much confidence it can gain adoption outside of the Apple ecosystem.

Re:Approaches to Type Erasure in Swift (2020) by indemnity on Wednesday April 28, 2021 @01:34PM (#26971992)
This is on the money. Tooling and cross platform ecosystem are a big reason I moved to Rust/Go for my server side needs.

A tar ball of something that can run on Ubuntu is simply not good enough.

Re:Approaches to Type Erasure in Swift (2020) by joshuawright11 on Wednesday April 28, 2021 @02:18PM (#26972385)
Yeah I 100% agree that the tooling is not there outside of macOS.

That being said, it started as geared towards iOS/macOS & even so there have been decent cross platform wins (linux compiler support is pretty solid, SPM).

I hope that as the language matures the language features that have been the priority on the roadmap (async/await, generics, memory management) will give way to more cross platform tooling.

Re:Approaches to Type Erasure in Swift (2020) by liuliu on Wednesday April 28, 2021 @12:58PM (#26971583)
The language also had some false starts (in 1.0 / 2.0) and some interoperability baggage (with ObjC). But arguably, it is in a steady path now. If Apple continue the current path, in 3 or 4 years, it will be much more interesting.

Of course, in our industry, whether anything can continue the current path for another 3 or 4 years is a big unknown itself.