[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question on file GSString.m
From: |
Richard Frith-Macdonald |
Subject: |
Re: Question on file GSString.m |
Date: |
Sun, 14 Aug 2011 21:57:22 +0100 |
On 14 Aug 2011, at 21:20, Fred Kiefer wrote:
> I just noticed that we have lots of reimplementation of NSString methods in
> the sub classes in GSString.m. Some of these are actually needed like
> implementing -initWithBytesNoCopy:length:encoding:freeWhenDone:, many others
> look plain wrong. Why would we duplicate code here, in some cases even in a
> worse form? After the current code freeze on base, could somebody please go
> through this file and clean out the duplicated methods?
Subclasses are *supposed* to reimplement the methods of a class cluster ...
1. the primitive methods have to be implemented for the classes to function at
all
2. many/most other methods need to be implemented in terms of the concrete
ivars actually used ... so we get decent performance.
There shouldn't be any real duplication of code, but there should be a *lot* of
methods re-implemented ... to access the 8 or 16 bit character data within the
strings directly. These should *not* be 'cleaned out' since they are essential
for decent performance.