> On May 24, 2016, at 11:03 AM, Tony Parker <anthony.par...@apple.com> wrote:
> 
> Why not use `func boolValue` instead, if you need a true/false answer?

I don’t remember the original code snippet, but there are cases where you need 
to know what type of number is stored in an NSNumber. An example is encoding to 
JSON, where a boolean value should be written as “true” or “false”, not “1” or 
“0”.

—Jens
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to