Live data from Hacker News

Apple is rewriting Foundation in Swift

github.com

101–110 of 263 posts

Re: Apple is rewriting Foundation in Swift

#101
post #87

Earlier quoted context omitted.

I thought Kotlin was pretty widely used as a Java alternative on the backend

Kotlin seems kinds of pointless with the features in newer Java versions

Just looking at Java’s upcoming string interpolation makes me so happy I moved to Kotlin years ago.

https://openjdk.org/jeps/430

Re: Apple is rewriting Foundation in Swift

#102
post #79

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…

Totally valid point that swift is only useful for developing for Apple products, but this same criticism also applies more or less to Kotlin on Android. If you are dealing with iOS it is a joy compared to objective C. I would also add that it is a really nice language in general that is modern, expressive and general ergonomic.

Kotlin wasn't developed for Android. And can be run anywhere.

It was JetBrains pet project to fix archaic stuff in Java without making a Scala. It was designed from the get go for a wide base (as wide as java).

I'm not sure how it became Android's main target, but I doubt it was the original purpose.

Re: Apple is rewriting Foundation in Swift

#103
Hot-take from someone who is currently helping to port GNUStep's implementation of the Foundation framework to the Sega Dreamcast:

Gross. The whole appeal of Foundation was having this incredibly convenient, beautiful, high-level object-oriented API ontop of low-level, statically compiled performant C...

The true path forward for computing is clearly an alliance among the holy trinity of god's C languages: C, C++, and Objective-C.

Yes, the future is in Objective-C++'s hands.

Re: Apple is rewriting Foundation in Swift

#104

Hot-take from someone who is currently helping to port GNUStep's implementation of the Foundation framework to the Sega Dreamcast: Gross. The whole appeal of Foundation was having this incredibly convenient, beautiful, high-level object-oriented API ontop of low-level, statically compiled performant C... The true path forward for computing is clearly an alliance among the holy trinity of god's C languages: C, C++, an…

Objective-C++ is underrated.

Re: Apple is rewriting Foundation in Swift

#105
post #92

Earlier quoted context omitted.

> From what I've seen the ref counting can cause a big performance hit. Apple has been writing OS components in Swift for a while now. It certainly doesn't seem to be producing the performance issues we saw when Google attempted to write components for Fuchsia in Go or Microsoft's effort to create new features for Longhorn in .NET.

But it's mostly replacing Objective-C code which was already not particularly fast – as opposed to the C++ or C code used more often in performance- or memory-sensitive areas. My experience with Swift is somewhat limited, because every time I've tried to use it, I've run into glaring performance issues and had to switch language. It might be reasonably performant compared to Go or .NET, but it's nothing like Rust.

What kind of stuff were you doing in Swift to notice performance issues? I've been developing macOS and iOS apps for a while now and it doesn't seem much slower than Objective-C.

Re: Apple is rewriting Foundation in Swift

#106
post #79

Earlier quoted context omitted.

Totally valid point that swift is only useful for developing for Apple products, but this same criticism also applies more or less to Kotlin on Android. If you are dealing with iOS it is a joy compared to objective C. I would also add that it is a really nice language in general that is modern, expressive and general ergonomic.

Kotlin wasn't developed for Android. And can be run anywhere. It was JetBrains pet project to fix archaic stuff in Java without making a Scala. It was designed from the get go for a wide base (as wide as java). I'm not sure how it became Android's main target, but I doubt it was the original purpose.

Further to that point, Kotlin mainly targets the JVM (which can run pretty much everywhere), but also can be compiled to JavaScript, LLVM, and a bunch of other targets.

Honestly the only times I've evaluated Kotlin for personal projects was bc of that flexibility.

Re: Apple is rewriting Foundation in Swift

#107
post #62
post #59

Earlier quoted context omitted.

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"

Still waiting on Apple Silicon DB2 driver. Any day now, I know it!

Re: Apple is rewriting Foundation in Swift

#108

Hot-take from someone who is currently helping to port GNUStep's implementation of the Foundation framework to the Sega Dreamcast: Gross. The whole appeal of Foundation was having this incredibly convenient, beautiful, high-level object-oriented API ontop of low-level, statically compiled performant C... The true path forward for computing is clearly an alliance among the holy trinity of god's C languages: C, C++, an…

Objective-C++ is underrated.

It really is a beautiful language, and some of the most powerful aspects of Swift are due to its Objective-C roots.

Re: Apple is rewriting Foundation in Swift

#109
post #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-understoo…

This is a new effort that is committed to shipping on Apple platforms. It will also be the first time 3rd parties can get code changes into Foundation.

Re: Apple is rewriting Foundation in Swift

#110
post #79

Earlier quoted context omitted.

Totally valid point that swift is only useful for developing for Apple products, but this same criticism also applies more or less to Kotlin on Android. If you are dealing with iOS it is a joy compared to objective C. I would also add that it is a really nice language in general that is modern, expressive and general ergonomic.

Kotlin wasn't developed for Android. And can be run anywhere. It was JetBrains pet project to fix archaic stuff in Java without making a Scala. It was designed from the get go for a wide base (as wide as java). I'm not sure how it became Android's main target, but I doubt it was the original purpose.

I think everyone jumped from Java to Kotlin due to Oracle suing Google over Java in Android. It also provided a huge opportunity to be more deliberate since Android was maturing.
Post reply on HN