Talk:Or operator: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>NXTBoy No edit summary |
>NXTBoy No edit summary |
(No difference)
|
Revision as of 15:04, 15 July 2011
or isn't limited to if statements. Needs examples of other users, such as y = nil; x = y or 5, and then x is 5 not nil.
Trappingnoobs (Writer) Come check out my User page!
- What is the purpose of this page? We shouldn't make a page on a specific operator (unless there is a lot to it). For instance, rather than make a page on or, make a page on logical operators and a page on ternary.
-
- Logical operators should be part of the Boolean page. However,
and
andor
, in Lua, are not strictly logical operators. This should be made clear somewhere.- They definitely shouldn't be in the boolean page. Why would they go there? Just make a page on Ternary :/
- Couple of mistakes you've made. Firstly, by definition, logical operators apply to logical values, that is booleans. So therefore, logical operators, being boolean operators, should be on the boolean page. The issue here is that lua's
and
andor
operators are not truly logical operators, since they do not always return booleans. So I guess a separate page would be handy. - The more important point is that
a and b or c
is NOT "the ternary operator", just like in C, where
a ? b : c
is NOT "the ternary operator". In C, it is "the conditional operator", which happens to be a ternary operator, since it takes three operands. In lua, it's not even an operator - it's just an idiom. If I had to name it, I'd go with "the conditional idiom"
- Couple of mistakes you've made. Firstly, by definition, logical operators apply to logical values, that is booleans. So therefore, logical operators, being boolean operators, should be on the boolean page. The issue here is that lua's
- They definitely shouldn't be in the boolean page. Why would they go there? Just make a page on Ternary :/
- Logical operators should be part of the Boolean page. However,