Swift - Bool vs Boolean

空扰寡人 提交于 2020-01-24 03:16:05

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!