[swift-users] true false vs yes no
Isaac Gouy
igouy2 at yahoo.com
Sun Feb 7 11:19:27 CST 2016
On Sunday, February 7, 2016 8:23 AM, Oliver M <selectedfordeletion at yahoo.com> wrote:
>The term "isLightOn" due to it sounding like a question suggests it having variability
> (being a variable): isLightOn = yes ; isLightOn = no ; both seem logically valid.
In programming, the term does not stand alone; the term has a context provided by other code statements -- if, while ...
if isLightOn { }
while isLightOn { }
Those seem like peculiar questions.
>The term "lightIsOn" due to it sounding like an answer suggests it being non-variable (being a value, perhaps an enum) conditionOfLight = lightIsOn ; conditionOfLight = lightIsDimmed ;
> conditionOfLight = lightIsOff; seem logically valid.
When more than 2 states are needed, Yes/No True/False won't be enough.
More information about the swift-users
mailing list