discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is anyone using -fobjc-gc?


From: David Chisnall
Subject: Re: Is anyone using -fobjc-gc?
Date: Fri, 21 Aug 2015 11:14:27 +0100

On 21 Aug 2015, at 10:55, Richard Frith-Macdonald 
<richardfrithmacdonald@gmail.com> wrote:
> 
> While both David and I have put a lot of effort into *two* different sets of 
> GC support (both Apple compatible and pre-Apple), and therefore I guess have 
> an emotional investment in it, my objective side says that it just makes the 
> source code more complex and therefore less maintainable and we’d be better 
> off removing it.

My emotional involvement is somewhat negative: by the time I’d finished 
implementing Apple-compatible GC and chasing down various related bug, I was 
firmly convinced that it was a terrible idea.  I never used it for any code, 
other than to test that existing programs didn’t break with GC enabled, and 
supported it solely to aid porting applications from OS X.

> So, should we remove GC support from GNUstep (as well as saying it’s fine to 
> remove it from clang)?

If no one is using either form of GC, then I’d be in favour of completely 
removing both.  They complicate the code considerably.  We have some tangled 
ifdefs and I suspect that a lot of code paths are not well tested.

It was possible to compile -base (and, I think, -gui) in Apple-compatible 
GC-optional mode, where retain and release are used, but so are the GC hooks, 
allowing the frameworks to be shipped in one binary that could work with RR or 
GC programs, but I have not tried this for some years and do not have a great 
deal of confidence that it still works.

The maintenance burden is not huge, but it is there and there are several 
changes (e.g. NSPointerArray) that are expected to work with GC but are not, as 
far as I know, tested in that configuration.  If someone is using GC and is 
willing to take responsibility for ensuring that it is well tested, then I 
don’t mind keeping it, but otherwise I’d be in favour of stripping it out 
completely.

David

-- Sent from my Apple II




reply via email to

[Prev in Thread] Current Thread [Next in Thread]