News for hackers. Stuff that matters.
Re:Apple is rewriting Foundation in Swift by gyrovorbis on Monday May 22, 2023 @12:39AM (#36027526)
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++, and Objective-C.

Yes, the future is in Objective-C++'s hands.

Re:Apple is rewriting Foundation in Swift by ridiculous_fish on Monday May 22, 2023 @12:42AM (#36027535)
Objective-C++ is underrated.
Re:Apple is rewriting Foundation in Swift by gyrovorbis on Monday May 22, 2023 @12:46AM (#36027565)
It really is a beautiful language, and some of the most powerful aspects of Swift are due to its Objective-C roots.
Re:Apple is rewriting Foundation in Swift by xenadu02 on Monday May 22, 2023 @12:58AM (#36027627)
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.

Re:Apple is rewriting Foundation in Swift by saagarjha on Monday May 22, 2023 @02:10AM (#36028004)
I mean it’s there by virtue of the shared cache, but if we’re talking about what actually gets “loaded” I believe it’s still possible to write binaries that don’t bring in libobjc.
Re:Apple is rewriting Foundation in Swift by mpweiher on Monday May 22, 2023 @02:42AM (#36028205)
Objective-C was always "good enough", and in fact the rewrite from an Objective-C Foundation to the C-based CoreFoundation saw a huge regression:

https://groups.google.com/g/comp.sys.next.advocacy/c/uOQnC1x...

The objections to Objective-C at Apple were always political, not technical, with a very entrenched "no Objective-C, ever" faction. Took a quarter of a century, but it looks like they finally won.

Re:Apple is rewriting Foundation in Swift by gyrovorbis on Monday May 22, 2023 @12:07PM (#36033218)
Wow, thank you for sharing!

Dude, clicked your profile links, and wtf? Objective-S looks awesome! I had never even heard of it, but creating a more easy-to-use language ontop of the Obj-C runtime is epic!

I actually wrote my own C-based meta type system for giving my core library and applications that use it a language-independent object-oriented C layer for interop. That's actually how I discovered the magic that is Objective-C and how powerful the C runtime actually is... that's why I'm sad to see it slowly disappear, and anything like this that keeps it alive and uses it is really cool to me. :)

I just wrote unit tests for making sure the Objective-C runtime is working and doesn't accidentally get broken in the indie SDK, KallistiOS, for the Sega Dreamcast: https://github.com/KallistiOS/KallistiOS/pull/202, haha.

Re:Apple is rewriting Foundation in Swift by lloydatkinson on Monday May 22, 2023 @04:27AM (#36028770)
Somehow I doubt porting MacOS to old game consoles was Apple's priority when making this decision.
Re:Apple is rewriting Foundation in Swift by gyrovorbis on Monday May 22, 2023 @12:10PM (#36033259)
I'm not porting MacOS. I'm porting just the Foundation layer, and I'm not using Apple's implementation, I'm using GNUStep's.

But hey, maybe having a core, foundational framework written in the most performant language out there with the most hardware support should've been a priority. ;)