Live data from Hacker News

Apple is rewriting Foundation in Swift

github.com

231–240 of 263 posts

Re: Apple is rewriting Foundation in Swift

#231
post #138

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…

While it’s true that the language is really only useful on just Apple platforms, it is still quite an amazing language. I have professionally used about half a dozen languages over the last many years, written hundreds of thousands of lines each in all those languages, and swift is a true breath of fresh air. It checks all the boxes for me, very concise and elegant to write, yet very strictly statically typed. A nice…

>Runs reasonably fast, on par with Go or Java.

Having to deal with weakself, no reference cycles, very limited closures, having to deal with Xcode, no integration with any other IDE because Apple Apples, debatable generics, SPM, debatable cross platform abilities, fucking Tasks and Actors, SwiftUI being locked to versions of Swift, extremely limited community, few high quality open source libraries for something that only performs as well as Java is quite the hard sell.

For that price, you could also get Kotlin which fixes most of Java's problems and provides access to all the JVM as well as Kotlin/Native, with top tier DSL abilities and a really well thought out stdlib, coroutines, reified funs and much more.

Re: Apple is rewriting Foundation in Swift

#232
post #60

Earlier quoted context omitted.

The package manager has been open source, cross platform and available since pretty much from the start. The standard library is becoming cross-platform as we discuss it here.

> The standard library is becoming cross-platform as we discuss it here. I'd argue that it's too late already, the ship has sailed, Swift is heading the same way as C#.

I'm having a hard time seeing Swift becoming a well-respected and easily considered language for your next project. The sheer lack of anything outside of what Apple has made already makes it a non starter. In comparison, .Net is absolutely amazing.

Re: Apple is rewriting Foundation in Swift

#233
post #71
post #61

Earlier quoted context omitted.

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…

The Swift compiler and standard library are pretty tightly linked. The Swift type system is getting pretty complicated already, handling a whole range of lifetimes, async, the combination of protocols, generics, existentials, etc. with some magic handling for arrays and maps in the library. So the cost of cross-platform effort would be significant. The greatest barrier to entry is XCode. It's archaic, impossible to e…

Kotlin/Native deploys and works on iOS, but due to Apple holding back on opening up Swift, it has to do everything through ObjC interop. But make no mistake, to Apple, that's a feature: if other languages have a hard time integrating in their ecosystem, they'll go away.

Re: Apple is rewriting Foundation in Swift

#234
post #111

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…

> No one outside Apple chooses Shift unless they want to build something in Apple's ecosystem. “No one” Yet The Browser Company (The one that is hyping the Arc Browser) is writing their browser in Swift to support Windows. [0] which that is their main product. The Browser Company is not “No one”. [0] https://m.youtube.com/watch?v=Xa_fNuaSE_I EDIT: So this video doesn't show someone choosing Swift outside of Apple and…

The Browser Company is absolutely no one. They're barely more influent than me creating a repo on github, and that kind of impact is pretty damn low as is. They're a 0.000% browser share company that runs a tight marketing campaign of only inviting tech influencers to their browser. Mind you, said browser has good ideas, great ones even. But overall, they're absolutely no one.

iOS/macOS devs use Swift on other platforms because it's the only language they know, yeepidodadey. Ignore the fact that 99% of their project is cinterop with Chromium

Re: Apple is rewriting Foundation in Swift

#235
post #29

Earlier quoted context omitted.

What a weird usage of that word…

GP was probably looking for the word "astroturfing": astroturfing: > The disguising of an orchestrated campaign as a "grass-roots" event – i.e., a spontaneous upwelling of public opinion. https://en.wiktionary.org/wiki/astroturfing agitprop: > Political propaganda disseminated through art, drama, literature, etc., especially communist propaganda; (specifically, communism, historical) such propaganda formerly dissemin…

It's obviously not astroturfing since it's a statement from Apple themselves. Astroturfing, if we were talking politics, would be if Apple secretly funded swift user groups across the world to make it appear that people liked the language.

Obviously they don't have to do that, since people love it.

Re: Apple is rewriting Foundation in Swift

#236

Swift has been a hugely successfully language. Mostly at slowing down iOS runtime performance per clock cycle, and increasing compilation times. Its also been hugely successful at punishing companies for using it, since it didnt really work for a few versions. While there have been fewer crashes (sort of) due to the switch, as someone who worked for years in Objective C and years in Swift, I honestly never felt that…

[flagged]

Re: Apple is rewriting Foundation in Swift

#237
post #202

Earlier quoted context omitted.

The appeal of swift is that it is lightyears better than ObjectiveC. To ObjC developers that are used to being treated like trash by Apple (abysmal documentation, stone age IDE and tooling etc) that's huge

Apple's documentation was actually vastly superior before Swift. In fact, I often refer to the documentation "archive" instead of the latest docs. The decline in the docs is due to a number of factors, but I would say mainly it's (1) the relentless annual major OS update schedule, (2) the proliferation of OS (macOS, iOS, watchOS, tvOS, xrOS?), (3) the dual language stack, (4) Apple personnel turnover.

Apple seems to abuse the fact that people make a living translating the lack of documentation into online courses, books, and articles. The market for this is an ongoing enabler at this point.

Re: Apple is rewriting Foundation in Swift

#238
post #142

Earlier quoted context omitted.

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.

Because Google and JetBrains are in bed together in what concerns Android development tooling. Try to use Kotlin without the Android ecosystem, it is just syntax sugar for the JVM.

Java is just syntax sugar for the JVM too, it's just that Kotlin is a better one.

Re: Apple is rewriting Foundation in Swift

#239

Earlier quoted context omitted.

Foundation has not been a pure layer on top of CoreFoundation for over a decade. Some class implementations are unified on the ObjC version, not the pure C CoreFoundation version. Objective-C got good enough that all processes on Apple platforms have the objc runtime in their address space whether they want it or not and many pure C or CF-like frameworks are built on ObjC under the covers.

Objective-C was always "good enough", and in fact the rewrite from an Objective-C Foundation to the C-based CoreFoundation saw a huge regression: https://groups.google.com/g/comp.sys.next.advocacy/c/uOQnC1x... The objections to Objective-C at Apple were always political, not technical, with a very entrenched "no Objective-C, ever" faction. Took a quarter of a century, but it looks like they finally won.

Wow, thank you for sharing!

Dude, clicked your profile links, and wtf? Objective-S looks awesome! I had never even heard of it, but creating a more easy-to-use language ontop of the Obj-C runtime is epic!

I actually wrote my own C-based meta type system for giving my core library and applications that use it a language-independent object-oriented C layer for interop. That's actually how I discovered the magic that is Objective-C and how powerful the C runtime actually is... that's why I'm sad to see it slowly disappear, and anything like this that keeps it alive and uses it is really cool to me. :)

I just wrote unit tests for making sure the Objective-C runtime is working and doesn't accidentally get broken in the indie SDK, KallistiOS, for the Sega Dreamcast: https://github.com/KallistiOS/KallistiOS/pull/202, haha.

Re: Apple is rewriting Foundation in Swift

#240

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…

Somehow I doubt porting MacOS to old game consoles was Apple's priority when making this decision.

I'm not porting MacOS. I'm porting just the Foundation layer, and I'm not using Apple's implementation, I'm using GNUStep's.

But hey, maybe having a core, foundational framework written in the most performant language out there with the most hardware support should've been a priority. ;)

Post reply on HN