Live data from Hacker News

Apple announces full Swift rewrite of the Foundation framework (2022)

infoq.com

241–250 of 402 posts

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#241

Tangental question: How do you Swift-using, non-app developers find out how to do basic anything non-app related, such as reading files and making network connections? I Google for stuff and probably 3/4s of the result are out of date and won't work in any reasonably modern version of Swift. I find Apple's Developer documentation sub-par, to say the least. So, how do you navigate it all? It's quite a shock coming fro…

Mostly through sites like hackingwithswift.com

Those are generally enough to get you to the point where you can make sense of Apple’s documentation.

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#242
Who else remembers when they re-implemented the (at the time version of) the Foundation framework in Java for WebObjects? That was, what, 1998? Right around when NeXT got re-absorbed by Apple, not sure if the rewrite was started before or after.

https://developer.apple.com/library/archive/documentation/Le...

https://en.wikibooks.org/wiki/WebObjects/Overview/Objective-...

Those were the days! Actually kind of amazing that the Foundation framework is the result of steady evolution of an ObjC framework written by NeXT... over 30 years ago? All those `NS` prefixes that are still hanging on are for `NextStep`.

If this really replaces the ObjC implementation... would that be the final sunset of the codebase that has been there (at least ship of theseus style) from NeXTStep days? I wonder if there's continuous version control history of Foundation source from the start, and how many, if any, lines of code remain from the initial implementation.

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#243

The removal of C from Android and iOS is going to pay off massively. The current state of things where every government is sitting on an endless collection of exploits is not ideal.

Interesting. I didn't realize C was so easy to exploit (I am a novice). Very interesting implications for security. Thanks for the cool insight.

It's not necessarily _easy_ to exploit iOS, the problem is that world governments and hacker orgs have budgets in the millions to find these exploits. We have already gone as far as we can by just telling people to be more careful when using C so to solve this problem the only way forward is languages which make it harder or impossible to make the mistake that keep happening in C programs. Apple opting for Swift and Google using Rust in Android.

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#244

This is an other step in the direction to a Swift-only Apple platforms. I don't think it would be worth my time to even buy a other macOS device to port my framework. I don't think they will get any benefit from this.

It's a good question as to how long Apple will support calling its APIs from C++ via Objective-C++. I don't see any good reason for them to deprecate the ObjC-Swift bridge, but I guess they could decide it's too much work to maintain.

When the last ObjC framework is gone? Surely that’s decades away. There are zillions of frameworks in PrivateFrameworks, many written in ObjC.

The Swift/C++ bridging stuff is pretty exciting though. A lot of engineering is being thrown into this.

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#245
post #52

I don't know Swift too well but my impression is that the support on Linux within the Foundation is not complete. (Also, is Foundation the same thing as what one might normally term a standard library? I can't tell.) Does this change imply better (eventual) support on non-Darwin systems? Or maybe I've misread it and the change is unrelated.

Swift is great because it's the only alternative to Objective C. I don't really think anyone is clamoring for it to move into non-Apple domains.

I would love it.

Swift is fantastic, and by far my favorite language to write client code in. (Compared to Rust, TypeScript/JS, ObjC, C++, C#, & Java.)

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#246

Earlier quoted context omitted.

I wouldn't trust Apple as far as I could kick them. Not that I think they're evil per se, just that their motivations align with their shareholders, not the dev community. Too capricious by half

And historically Apple not aligning with developers is a good thing, isn’t it? There’s a few interesting old videos on YouTube where Steve Jobs is answering developer questions in the audience. Apple focused on the product and the customer, while Microsoft focused on “developers developers developers. We don’t need another Microsoft. We need them both to be different.

No need to wave the flag for your side - I don't trust MS for exactly the same reason. MS spouting BS to developers doesn't mean they actually prioritise them.

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#247

Who else remembers when they re-implemented the (at the time version of) the Foundation framework in Java for WebObjects? That was, what, 1998? Right around when NeXT got re-absorbed by Apple, not sure if the rewrite was started before or after. https://developer.apple.com/library/archive/documentation/Le... https://en.wikibooks.org/wiki/WebObjects/Overview/Objective-... Those were the days! Actually kind of amazing…

WebObjects is actually still alive and kicking, but only inside of Apple

A lot of the web services that Apple provides still use that implementation of Foundation :)

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#248

Who else remembers when they re-implemented the (at the time version of) the Foundation framework in Java for WebObjects? That was, what, 1998? Right around when NeXT got re-absorbed by Apple, not sure if the rewrite was started before or after. https://developer.apple.com/library/archive/documentation/Le... https://en.wikibooks.org/wiki/WebObjects/Overview/Objective-... Those were the days! Actually kind of amazing…

[deleted]

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#249

Tangental question: How do you Swift-using, non-app developers find out how to do basic anything non-app related, such as reading files and making network connections? I Google for stuff and probably 3/4s of the result are out of date and won't work in any reasonably modern version of Swift. I find Apple's Developer documentation sub-par, to say the least. So, how do you navigate it all? It's quite a shock coming fro…

[deleted]

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#250

Earlier quoted context omitted.

It’s not respectful to not read the link and instead ask somebody to summarise it for you.

You’re making the wrong assumption! I have read the article before I asked, and still have no idea what it is! Saying it provides these abstraction NSObject, NSString, NSArray tells me nothing! The article is clearly written towards readers familiar with Apple ecosystem.

The Foundation framework is basically the standard library of Objective C (and thus pretty much the standard library for most of the Apple ecosystem as well).
Post reply on HN