Re: Why ARC over garbage collection?
Re: Why ARC over garbage collection?
- Subject: Re: Why ARC over garbage collection?
- From: Jens Alfke <email@hidden>
- Date: Tue, 16 Oct 2012 08:54:19 -0700
On Oct 16, 2012, at 1:29 AM, Jean-Denis MUYS <email@hidden> 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.
LISP is definitely what I would call ‘managed’. It sounds like we’re just using different terminology for the same thing:
> In Lisp, you don't have pointers, and the only way to allocate memory is to "cons" (at least from the programmer perspective).
That’s exactly what I mean by ‘managed’, and I think that’s the regular definition. The language does not have direct access to unsafe actions like arbitrary pointer access, non-garbage-collected malloc, etc. (at least not without enabling some privileged ‘unsafe’ mode.) This has nothing to do with whether or not it compiles to native code. C# has always been able to compile to native code, and Java and JavaScript are almost always translated to native at load time.
> The Lisp cons cell is particularly easy to GC
Managed environments are much easier to GC than ones where the program is manipulating memory without the GC’s knowledge.
—Jens
_______________________________________________
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