Live data from Hacker News

Apple is rewriting Foundation in Swift

github.com

61–70 of 263 posts

Re: Apple is rewriting Foundation in Swift

#61

I just... completely don't understand the appeal of Swift beyond it being Apple's in-house language. I was excited for Foundation to become open-source. Using a language you'll really only find in 1 environment is a negative. I'm going to go feel ashamed for not getting excited about a language now. I should be celebrating "more languages", but Swift is just Apple. No one outside Apple chooses Shift unless they want…

If they just had a proper cross platform standard library and package manager it might be more successful, it is a pretty cool language. But the north Korean esque closed apple ecosystem makes that impossible, all of that is intentional.

Why is it not better for Apple to make Swift truly cross-platform?

Is it just that the maintenance cost is not worth it? Or would it threaten its ecosystem in a way that I don't understand?

It would seem that making Swift cross-platform would make Apple's ecosystem more accessible to developers. The barrier to entry would be lower if developers only needed to learn the APIs and not a whole new language and its tooling too. This would help the ecosystem stay healthy for a longer time.

Re: Apple is rewriting Foundation in Swift

#62
post #59

I just... completely don't understand the appeal of Swift beyond it being Apple's in-house language. I was excited for Foundation to become open-source. Using a language you'll really only find in 1 environment is a negative. I'm going to go feel ashamed for not getting excited about a language now. I should be celebrating "more languages", but Swift is just Apple. No one outside Apple chooses Shift unless they want…

IBM briefly did a "swift on the server" though at the beginning of 2020 IBM was no longer interested, but the page is still up. https://developer.ibm.com/languages/swift/ 2016: https://9to5mac.com/2016/02/22/ibm-swift-cloud-kitura/ 2016: https://www.infoq.com/presentations/swift-server/ 2020: https://www.infoq.com/news/2020/01/ibm-stop-work-swift-serve... You can run it in docker: https://hub.docker.com/_/swift

This was so predictable. I remember those articles, and thought "Gee, IBM doesn't know what they're doing, they're just jumping on random bandwagons"

Re: Apple is rewriting Foundation in Swift

#63

I just... completely don't understand the appeal of Swift beyond it being Apple's in-house language. I was excited for Foundation to become open-source. Using a language you'll really only find in 1 environment is a negative. I'm going to go feel ashamed for not getting excited about a language now. I should be celebrating "more languages", but Swift is just Apple. No one outside Apple chooses Shift unless they want…

> just... completely don't understand the appeal of Swift beyond it being Apple's in-house language.

It's like Rust in that it offers memory safety by default without a big performance hit.

Re: Apple is rewriting Foundation in Swift

#64

I just... completely don't understand the appeal of Swift beyond it being Apple's in-house language. I was excited for Foundation to become open-source. Using a language you'll really only find in 1 environment is a negative. I'm going to go feel ashamed for not getting excited about a language now. I should be celebrating "more languages", but Swift is just Apple. No one outside Apple chooses Shift unless they want…

My experience was the opposite, I really like Swift but its usefulness is held back by the lack of a wider community. I'm not sure if that's due to a lack of investment on Apple's part, or maybe that it lives in an unhappy compromise between C++ and Python where there's always a more mature alternative that's good enough, but the language itself is quite nice to write.

Re: Apple is rewriting Foundation in Swift

#65

I just... completely don't understand the appeal of Swift beyond it being Apple's in-house language. I was excited for Foundation to become open-source. Using a language you'll really only find in 1 environment is a negative. I'm going to go feel ashamed for not getting excited about a language now. I should be celebrating "more languages", but Swift is just Apple. No one outside Apple chooses Shift unless they want…

> just... completely don't understand the appeal of Swift beyond it being Apple's in-house language. It's like Rust in that it offers memory safety by default without a big performance hit.

From what I've seen the ref counting can cause a big performance hit. Maybe this has improved in the last couple years?

Re: Apple is rewriting Foundation in Swift

#66

What a dumpster fire Swift turned out to be. My first experience with it saw compile times go up more than 10x from the previous objc code base. Everytime more and more of apple's libraries were replaced because all the objc stuff was considered obsolete the compile times got worst and worst. Its not like I dislike the language either but I think compile times matter so languages should not pretend like that doesn't…

While low compile times are nice I don't find them strictly necessary for the day-to-day because I'm not constantly doing full builds. Swift's incremental compiles are more than fast enough for my needs, especially on M1/Ryzen 5000 or better.

Re: Apple is rewriting Foundation in Swift

#67
The project to rewrite Foundation in Swift is many years old, and had been stalled.

New in 2023 is instead NOT to match all of Foundation, but to make some core libraries that make Swift usable on many platforms. E.g., they broke out the very large internationalization/i18n tables required for unicode support into a separate module.

It's very unlikely Apple would move off their own Foundation, which is well-understood and well-tested. This strategy permits them to incrementally sidle over, but continue with both for some time. Aside from servers, it's likely to look promising for multiple tiny devices - trusted computing, watches, headsets, airpods, etc.

Re: Apple is rewriting Foundation in Swift

#68
post #61

Earlier quoted context omitted.

If they just had a proper cross platform standard library and package manager it might be more successful, it is a pretty cool language. But the north Korean esque closed apple ecosystem makes that impossible, all of that is intentional.

Why is it not better for Apple to make Swift truly cross-platform? Is it just that the maintenance cost is not worth it? Or would it threaten its ecosystem in a way that I don't understand? It would seem that making Swift cross-platform would make Apple's ecosystem more accessible to developers. The barrier to entry would be lower if developers only needed to learn the APIs and not a whole new language and its toolin…

I thought Apple just wants to be different, and making Switft not cross platform can make porting software on Apple ecosystem harder...

Re: Apple is rewriting Foundation in Swift

#70

I just... completely don't understand the appeal of Swift beyond it being Apple's in-house language. I was excited for Foundation to become open-source. Using a language you'll really only find in 1 environment is a negative. I'm going to go feel ashamed for not getting excited about a language now. I should be celebrating "more languages", but Swift is just Apple. No one outside Apple chooses Shift unless they want…

> just... completely don't understand the appeal of Swift beyond it being Apple's in-house language. It's like Rust in that it offers memory safety by default without a big performance hit.

I think many also find its syntax more approachable compared to that of Rust. It's got a lot of bells and whistles, but newcomers don't have to use them right away and can pick up more advanced bits as they become comfortable with doing so.
Post reply on HN