Earlier quoted context omitted.
> my impression is that the support on Linux within the Foundation is not complete It is not, but it's like 95% of the way there in my experience - most things that are missing are relatively recent additions that have some complex OS interactions, like filesystem I/O with language-level concurrency features. > Does this change imply better (eventual) support on non-Darwin systems? Yes. The non-Darwin Foundation vers…
It feels off to call things like Array part of any library when you have array literal syntax `let oddNumbers = [1, 3, 5, 7, 9, 11, 13, 15]` I'd call that a language feature. Or maybe with Swift there is a blurry line between the two?
Apple announces full Swift rewrite of the Foundation framework (2022)
51–60 of 402 posts
Re: Apple announces full Swift rewrite of the Foundation framework (2022)
#52I 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)
#53What remaining Apple frameworks are not yet written in Swift?
Re: Apple announces full Swift rewrite of the Foundation framework (2022)
#54Earlier quoted context omitted.
Things will get even slower.
Just to explain why Objective C code, in practice, is not especially fast: You generally make the choice between writing something in pure C, which gives you plenty of performance but little safety, or using Objective C classes and methods, which gives you plenty of safety but you're paying the price for dynamic dispatch (objc_msgSend) and pointer indirections all the time. Swift makes it easier to eliminate things l…
For more details, see iOS and macOS Performance Tuning: Cocoa, Cocoa Touch, Objective-C, and Swift, Addison-Wesley
https://www.amazon.com/iOS-macOS-Performance-Tuning-Objectiv...
If you don't want to read a book, here is an example as a series of blog posts: https://blog.metaobject.com/2020/04/somewhat-less-lethargic-...
Re: Apple announces full Swift rewrite of the Foundation framework (2022)
#55For example after all these years and lots of requests for such a feature it's still not possible to get notified about new reviews for your apps, but it's possible to get notified when a user edits a review after you've replied to it.
Re: Apple announces full Swift rewrite of the Foundation framework (2022)
#56I 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.
Re: Apple announces full Swift rewrite of the Foundation framework (2022)
#57Someone knowing existing pattern help me understand this. right now when i use these “foundation” apis in swift it is doing c call? so they rewriting now the c code in swift? (dont do ios or mac code so now sure) me dont understand what make it faster now. i once wrote some jni code to call c++ library from java. does mean there some similar code to do cross language call? they get rid of it and so things now faster?…
Re: Apple announces full Swift rewrite of the Foundation framework (2022)
#58I 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.
Re: Apple announces full Swift rewrite of the Foundation framework (2022)
#59Similar post by Michael Tsai with some quick summary points of the impact of this: https://mjtsai.com/blog/2022/12/12/the-swifty-future-of-foun...
>it sounds like the plan is to rewrite it in Swift and extend Swift to allow Objective-C to call the Swift implementation of the old API
Re: Apple announces full Swift rewrite of the Foundation framework (2022)
#60Earlier quoted context omitted.
Just to explain why Objective C code, in practice, is not especially fast: You generally make the choice between writing something in pure C, which gives you plenty of performance but little safety, or using Objective C classes and methods, which gives you plenty of safety but you're paying the price for dynamic dispatch (objc_msgSend) and pointer indirections all the time. Swift makes it easier to eliminate things l…
In practice would be what the resulting apps turn out like. In my experience, old-school ObjC iOS and Mac apps generally tended to be quite snappy. On the other hand, the new Swift hotness of Messages and Settings on macOS are noticably slower than what they're replacing. Of course I haven't done a comprehensive inventory, but I certainly don't have the general impression of things getting faster with Swift. (Are the…