Hello asd,

Optional GC is in Objective-C already and it works great!

NB: In this context by GC I mean automatic mark-sweep garbage
collection and *not* refcouting. I'm ignoring here Cocoa's
retain/release, because it's not directly relevant.

There are 3 options:

-no-gc. Like pure C - explicit manual memory management is used
exclusively. Can't talk to GC code at all. (I don't recommend that for
D).

OK i can tell right there that you are not talking about what I'm talking about. The case I'm looking at would never stop one chunk of code from calling another.


-gc-supported. Program's memory is not garbage collected, but the
program is able to talk to GCd OS and libraries. You use manual memory
management, but compiler inserts write barriers and other stuff needed
for seamless mixing with GCd pointers. (I imagine that'd be D's
-nogc).

Two bit's here are different than what I want: 1) the generated code wouldn't change, no write barriers nothing. And 2) there would be no difference at any level between GCd pointers and non GCd pointers. You could have the same pointer contain a reference to GCd data at one point and non GCd data at another and the compiler wouldn't even notice.

The reason I'm liking the idea is that it adds some useful abilities and *all* of the complexities that it entails already exist in D right now and have existed almost from the get go.

----   <IXOYE><


Reply via email to