News for hackers. Stuff that matters.
Re:Reference count, don't garbage collect by pjmlp on Saturday July 30, 2022 @04:32AM (#32285237)
https://github.com/ixy-languages/ixy-languages

The real reason why a tracing GC was a failure in Objective-C was due to the interoperability with the underlying C semantics, where anything goes.

The implementation was never stable enough beyond toy examples.

Naturally automating the Cocoa release/retain calls made more sense, given the constraints.

In typical Apple fashion they pivoted into it, gave the algorithm a fancy name, and then in a you're holding it wrong style message, sold their plan B as the best way in the world to manage memory.

When Swift came around, having the need to easily interop with the Objective-C ecosystem naturally meant to keep the same approach, otherwise they would need the same machinery that .NET uses (RCW/CCW) to interop with COM AddRef/Release.

What Apple has is excellent marketing.

Re:Reference count, don't garbage collect by mamcx on Saturday July 30, 2022 @11:43AM (#32287671)
> What Apple has is excellent marketing.

Whoa! Marketing? Interop with C is a MASSIVE use-case. And iOS is A LOT faster and more responsive than android. That is, right there, total proof that can't denied.

I do both, and the speed of apple way and the simplicity of bridge the C-abi is not a joke.

Re:Reference count, don't garbage collect by yyyk on Saturday July 30, 2022 @06:17PM (#32290917)
The android/iOS comparison has many more factors than GC type. I suspect the main difference is processor type - Qualcomm ARM has been very disappointing so far, and GC type doesn't even come into it.
Re:Reference count, don't garbage collect by mamcx on Saturday July 30, 2022 @10:33PM (#32292624)
Certainly, but Apple code also run on x86.

My main point actually is that Apple don't pick this route for the fun of it. It HAS a need to be performant on mobiles devices (that have less luxury to get a GC that eat Ram) and that need represent A LOT OF MONEY. You can say any step about this, including making processors, are directly or indirectly related to the need.

P.D: I don't see Rc VS Gc as enemies, but as faces of the same coin. ARC is just a way to apply some Gc lessons to naive Rc. I think naive Rc is truly worse than Gc, but smart Rc is total fine and consider it the best of both in the general case...

Re:Reference count, don't garbage collect by pjmlp on Monday August 01, 2022 @10:29AM (#32306465)