discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSNumber numberWithBool


From: Sebastian Reitenbach
Subject: Re: NSNumber numberWithBool
Date: Sat, 09 Jun 2007 08:05:14 +0200

Hi,

Helge Hess <helge.hess@opengroupware.org> wrote: 
> On Jun 8, 2007, at 21:26, Richard Frith-Macdonald wrote:
> > I read that as meaning that the string produced is for debug  
> > purposes, and feel that it implies that code should not depend on a  
> > particular format of the string content.  So it really should not  
> > matter exactly what is printed out ... both libFoundation and  
> > gnustep-base are correct, and code which depends upon either  
> > behavior is therefore incorrect.
> 
> I agree. I think what happens is that -stringValue, *not* - 
> description, is called. And -stringValue will invoke -description per  
> default.
> Anyways, I think that sope-gdl1 should not invoke -stringValue in  
> that context but be more clever about the object being passed in.
> 
> Anyways, on lF and Cocoa -description returns 1 for boolean YES  
> NSNumber's, GNUstep returns YES. (which is IMHO also fine, but  
> different)

Thanks for the insights, if I understand correct, everything is fine here, 
both return results are correct, and I should not rely that return values in 
different implementations are the same.

kind regards
Sebastian





reply via email to

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