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…
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.
Apple is rewriting Foundation in Swift
151–160 of 263 posts
Re: Apple is rewriting Foundation in Swift
#152Earlier quoted context omitted.
Apple’s problem has never been the “barrier to entry”. They know developers will make apps for their platform no matter what. If Swift becomes more universal it makes it easier for Apple developers to also develop for Android (etc) which Apple would see as a bad thing.
Wouldn't developers also develop for Android no matter what?
Re: Apple is rewriting Foundation in Swift
#153Earlier 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.
I think everyone jumped from Java to Kotlin due to Oracle suing Google over Java in Android. It also provided a huge opportunity to be more deliberate since Android was maturing.
Re: Apple is rewriting Foundation in Swift
#154not an apple fan,from obj-c to swift,why not just c++, NIH plus I-want-to-control-everything?
Seriously if you're going to take the cost of rewriting massive amounts of code, why would you not rewrite it in a language that offers actual improvements to the language that's being rewritten?
Apple already has (and uses) objective-c++, and the majority of objc I've ever interacted with is objc++ once you're outside of headers (just look for .mm extensions).
Re: Apple is rewriting Foundation in Swift
#155I 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…
IBM briefly did a "swift on the server" though at the beginning of 2020 IBM was no longer interested, but the page is still up. https://developer.ibm.com/languages/swift/ 2016: https://9to5mac.com/2016/02/22/ibm-swift-cloud-kitura/ 2016: https://www.infoq.com/presentations/swift-server/ 2020: https://www.infoq.com/news/2020/01/ibm-stop-work-swift-serve... You can run it in docker: https://hub.docker.com/_/swift
for now
just saw an article about IBM deleting most of their website because its a mess. It was some linkedin developer's post.
Re: Apple is rewriting Foundation in Swift
#156Earlier 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…
Apple’s problem has never been the “barrier to entry”. They know developers will make apps for their platform no matter what. If Swift becomes more universal it makes it easier for Apple developers to also develop for Android (etc) which Apple would see as a bad thing.
Re: Apple is rewriting Foundation in Swift
#157I 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…
How exactly are protocols a Swift "upgrade" to OO programming? They were in Objective-C since the mid 90s, adopted by Java as interfaces, copied by C# etc.
Also, protocols in Swift have a huge performance downside, because they decided to have them work across structs and classes: if you use a protocol in a function argument, the compiler doesn't even know the size of the argument at compile time, so copying the arguments has to be dynamically dispatched unless the compiler can figure it out in an extra optimisation pass...that's not possible when doing separate compilation.
> Runs reasonably fast, on par with Go or Java.
A downgrade...particularly considering the epic compile times.
> named parameters
Also there since the 80s, in a less weird way.
https://blog.metaobject.com/2020/06/the-curious-case-of-swif...
> ...professionally used about half a dozen languages ...
What languages were those, if I may ask?
Re: Apple is rewriting Foundation in Swift
#158Earlier quoted context omitted.
> just... completely don't understand the appeal of Swift beyond it being Apple's in-house language. It's like Rust in that it offers memory safety by default without a big performance hit.
> without a big performance hit. You might be surprised (I was). Most of the benchmarks I’ve seen place it more in the neighborhood of golang and v8, rather than the C, C++, rust neighborhood you might expect. Another commenter in this thread highlighted that the ref-counting GC is what keeps it out of the C / Rust performance neighborhood.
Re: Apple is rewriting Foundation in Swift
#159Earlier quoted context omitted.
> 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 who
[0] https://arc.net
Re: Apple is rewriting Foundation in Swift
#160I 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…
It took real effort from Microsoft into the Open Source space to make it more widely popular. Far away from Java or JavaScript, but I see many similarities between the development and evolution of Swift and C#.
Almost everything starts as a domain specific language. Same goes for JavaScript. First browser only, then through Node, suddenly JavaScript everywhere.
Python gained massive traction through Jupyter. Before that, I found Python a clumsy alternative to JavaScript. Since then I have changed my mind. ;)