discuss-gnustep
[Top][All Lists]
Advanced

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

Re: +(void)initialize


From: Nicola Pero
Subject: Re: +(void)initialize
Date: Fri, 19 Jul 2002 00:08:57 +0100 (BST)

> seems I've got a good sense for tracking weird problems currently. I've 
> spotted an incompatibility (or, better said,  difference) between GNU 
> and NeXT runtimes regarding the handling of +(void)initialize in 
> subclasses.

> [...]

> P.S.: I don't think that this is a bug in the GNU runtime, it's rather a 
> bug in the NeXT runtime. In a discussion we just had on this topic, 
> Erik, Helge and me favour the handling of the GNU runtime as it's much 
> more intuitive and obvious.

Very interesting. :-)

I prefer the GNU runtime behaviour too ... I would consider it a bug in
the NeXT runtime too.

I think you gave us a reason to keep GNUstep's +initialize methods as they
are now,

@implementation NSNicola

+ (void) initialize
{
  if (self == [NSNicola class])
    {
      /* Real code here.  */
    }
}

@end

since that makes sure the code will work in the same way on GNU and NeXT
runtimes.

Otherwise, the safety check is useless on the GNU runtime.




reply via email to

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