问题
I am teaching myself to program using Swift 3, and I am currently learning about booleans. I noticed that if I want to explicitly declare my variable of type bool, I have two options
Bool
or
Boolean
I was wondering why we have these two options if they are the same? Well, are they the same? This is what I'm confused about.
Thanks in advance.
回答1:
Bool
is Swift's boolean data type. Boolean
hasn't existed since the early days of Swift.
来源:https://stackoverflow.com/questions/40776830/swift-bool-vs-boolean