Hi,
Hey,

I don't like using PRIdPTR because it took me a while to figure out why it 
works (I had to look up that it's a format string for intptr_t, and then check 
the NSInteger definition to verify that that is also intptr_t…), and PRIdPTR 
introduces a dependency on how NSInteger is defined everywhere you use it.

Personally I always cast NSInteger/CGFloat to a c89 type when I need to print them, since it will 
work on any Foundation implementation. Anyway, we just have to make sure we never have (@"foo: 
%f", someCGFloat) or  (@"foo: %d", someNSInteger)!
Putting an explicit cast sounds like a more readable idea too. It took me a bit to know what PRIdPTR actually does (well, I grep'd the headers and discovered that on sparc it is for example "lu" even if it is a 32bit sparc...).

David did already a lot of work which needs to be updated again :(

Any other have comments about this?

Riccardo

_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to