Something that aroused my interest was the definition of the BOOL Objective-C type.
Why is it defined as a signed char (which can cause unexpected behavior if it is assigned a value greater than 1 byte in length) and not as int , since C (much less margin for error: a zero value is false, a value other than zero is equal to true)?
The only reason I can think of is to create an optimization store for Objective-C designers, since char will use less memory than int . Please can someone enlighten me?
source share