Re: Why ARC over garbage collection?
Re: Why ARC over garbage collection?
- Subject: Re: Why ARC over garbage collection?
- From: Jean-Denis MUYS <email@hidden>
- Date: Tue, 16 Oct 2012 08:29:11 +0000
- Thread-topic: Why ARC over garbage collection?
wrote:
As
I said before, it’s much harder (perhaps impossible) to implement really efficient GC for native apps. It works a lot better in ‘managed’ environments like Java/C#/Smalltalk/LISP/etc.
Lisp in this list is *not* a language that usually runs in a managed environment. Macintosh Common Lisp had full ephemeral GC back in the 1990's and it generated native 68k code (under Mac OS 7 back then IIRC). So does its offspring Closure.
So it *is* possible to have efficient, non-intrusive GC in fully native applications running statically-compiled object code.
The main difference between Lisp and Objective-C is that Objective-C - being C - lets you access your run-time environment at a very low level without the GC machinery finding out. In Lisp, you don't have pointers, and the only way to allocate memory is
to "cons" (at least from the programmer perspective). The Lisp cons cell is particularly easy to GC. Adding CLOS (the Common Lisp Object System) didn't impair GC in any way. The key issue is not native vs managed, nor the cons cell, but the "no pointer" model.
JD
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden