[swift-evolution] What about garbage collection?

Joe Groff jgroff at apple.com
Tue Feb 9 11:23:36 CST 2016


> On Feb 9, 2016, at 6:35 AM, Jean-Denis Muys via swift-evolution <swift-evolution at swift.org> wrote:
> 
> My understanding (from what I’ve seen in the literature, but I am in no way an expert) is that RC has worse worse case behaviour than GC regarding pauses.
> 
> Also arguments regarding RAM use (and perhaps even battery use), as all hardware resource-based arguments, have always been proven wrong in the past as hardware has evolved to more and better.
> 
> The usual argument is RAM is cheap, programmer’s time, especially debugging time, is expensive.
> 
> I find it interesting that the commonly accepted wisdom is that GC is the right thing to do. To quote but one blog post I’ve read:
> 
>> It’s a long since resolved dispute, and GC won. I don’t want Steve Jobs to reach out from the grave and drag us back to the 70s. There’s nothing special about mobile phones: they are more powerful than the computers that GC won on in the first place.
> 
> 
> So I’d be interested in understanding why we are about alone on our Apple island with our opinion that RC is better than GC? Are they all collectively wrong in the rest of the universe? (not that I condone argument from majority)
> 
> I can only state that my experience with GC has been with mostly with Macintosh Common Lisp a rather long time ago, and I did really love it.
> 
> So for me, GC would be a +1, but not a very strong one, as I find RC adequate.

I don't think it's just the Apple island—mark-and-sweep GC languages have consistently been tried and failed on the client side. Java applets and client-side apps died quickly; Microsoft tried and failed several times to reinvent their stack on top of .NET, and has since retreated to a refcounting-based foundation for WinRT; Apple too has tried to bring GC to the client several times, with the Java bridge, MacRuby, and ObjC GC. Javascript in the browser is an exception, though even there people are trying really hard to supplant it with a more primitive foundation like WebAssembly or asm.js.

-Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160209/54d2d029/attachment.html>


More information about the swift-evolution mailing list