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. _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev