Live data from Hacker News

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

infoq.com

11–20 of 402 posts

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

#11

“A reimplementation of Calendar in Swift is 1.5x to 18x as fast as the C one (calling from Swift in various synthetic benchmarks like creation, date calculation).” I’m sure it is, but this is not solving the right problem at all. Calendar is all UI. It needs to be lovingly gone over, not this.

Note the somewhat disingenuous performance claim:

The reimplementation itself is not 1.5x to 18x as fast as the C one. It is calling from Swift that is faster.

Yes, they correct in the parenthesis, but that's not how parenthetical expressions work:

A parenthetical expression is extra information added to a sentence or question that clarifies, explains, or adds information without changing the basic meaning. Think of it as an aside providing readers with helpful information that they don’t absolutely have to have, but that is helpful to them.

https://grammar.yourdictionary.com/style-and-usage/parenthet...

So basically, they are fixing the problem they've been having with bridging performance, which of course is due purely to them mis-designing Swift in such a way that it doesn't bridge well with all the existing code they have.

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

#12
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.

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

#13
post #8

Todd, you owe me $20. (Todd said this would never happen) Also, this is great news, and it will be interesting to see what kind of real-world changes in performance this has.

Things will get even slower.

Why do you think it’ll be slower? The article says the opposite

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

#14
post #8

Todd, you owe me $20. (Todd said this would never happen) Also, this is great news, and it will be interesting to see what kind of real-world changes in performance this has.

Things will get even slower.

Available data so far seems to show that the pure Swift implementations are faster than the Objective-C ones even when called from ObjC clients.

I don't have a link, so feel free to treat as hearsay, but FYI.

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

#15
post #8

Todd, you owe me $20. (Todd said this would never happen) Also, this is great news, and it will be interesting to see what kind of real-world changes in performance this has.

Things will get even slower.

What are you basing that on? It seems unlikely that they'd reverse the ongoing trend of improved performance, especially at a time when they're shedding backwards compatibility concerns with the migration to ARM removing the least-maintained apps.

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

#17

“A reimplementation of Calendar in Swift is 1.5x to 18x as fast as the C one (calling from Swift in various synthetic benchmarks like creation, date calculation).” I’m sure it is, but this is not solving the right problem at all. Calendar is all UI. It needs to be lovingly gone over, not this.

Note the somewhat disingenuous performance claim: The reimplementation itself is not 1.5x to 18x as fast as the C one. It is calling from Swift that is faster. Yes, they correct in the parenthesis, but that's not how parenthetical expressions work: A parenthetical expression is extra information added to a sentence or question that clarifies, explains, or adds information without changing the basic meaning. Think of…

No, I think you are misunderstanding the parenthetical claim. They are still benchmarking the actual reimplementation, they are just parenthetically pointing out that the reimplementations are being called from Swift, not Obj-C.

The reimplementation itself is 1.5x to 18x. They are using the parenthetical in precisely the way the style and usage guide suggests, adding the additional information that the new implementation is called from Swift.

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

#18

Todd, you owe me $20. (Todd said this would never happen) Also, this is great news, and it will be interesting to see what kind of real-world changes in performance this has.

I really should have started using Long Bets years ago.

Ten years ago a “Tanya” told me she would never use an ebook to read literature. I’m pretty sure if I went to her house today I’d find 2. In fact I may be the only person I know who doesn’t own one (not wanting one and being fundamentally against them are two different things).

That’s the most memorable but I’ve had these sorts of “over my dead body” conversations on a hundred topics over the years.

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

#20
I am pretty certain that most of high level use cases for Rust could be replaced with Swift, with increased developer velocity, if Swift was actually cross platform. And that's coming from a Rust fan. It will be interesting to see how effective this rewrite is.
Post reply on HN