On Wednesday, 29 May 2013 at 00:46:18 UTC, Steven Schveighoffer
wrote:
On Tue, 28 May 2013 20:40:03 -0400, Manu <turkey...@gmail.com>
wrote:
ObjC and WinRT are both used successfully on embedded
hardware, I'm really
wondering if this is the way to go for embedded in D.
V8 uses an incremental collector (somehow?), which I've been
saying is
basically mandatory for embedded/realtime use. Apparently
Google agree.
Clearly others have already had this quarrel, their
resolutions are worth
consideration.
An interesting thing to note, Apple tried garbage collection
with Obj-C, but only on MacOS, and it's now been deprecated
since automatic reference counting was introduced [1]. It
never was on iOS.
So that is a telling omission I think.
-Steve
[1] https://en.wikipedia.org/wiki/Objective-C#Garbage_collection
The main reason was that the GC never worked properly given the C
underpinnings of Objective-C.
Too many libraries failed to work properly with GC enabled, plus
you needed to fill your code with GC friendly annotations.
So I imagine Apple tried to find a compromises that would work
better in a language with C "safety".
Even that is only supported at the Objective-C language level and
it requires both compiler support and that objects inherit from
NSObject as top most class, as far as I am aware.
Anyway it is way better than pure manual memory management.
--
Paulo