Live data from Hacker News

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

infoq.com

1–10 of 402 posts

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

#5
“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.

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

#6

“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.

That quote is talking about the Foundation type named Calendar (https://developer.apple.com/documentation/foundation/calenda...), not Calendar.app.

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

#7

“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.

Calendar/Date is the foundation for all time handling in iOS apps. If you see a string with a date in it it was probably handled by this system.

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

#9

“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.

This post is referring to NSCalendar and Swift's Calendar class.

> NSCalendar objects encapsulate information about systems of reckoning time in which the beginning, length, and divisions of a year are defined.

> The Swift overlay to the Foundation framework provides the Calendar structure, which bridges to the NSCalendar class.

https://developer.apple.com/documentation/foundation/nscalen...

Post reply on HN