-
Notifications
You must be signed in to change notification settings - Fork 15
true is truthy is true #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -300,9 +300,8 @@ It's simply too easy to cause a lot of problems for a lot of people when you're | |
|
|
||
| ### If True Is True Equal To Truly True Is The Truth | ||
|
|
||
| The way the `if` command in Denizen works is it processes the arguments using logical comparison techniques, then runs the code inside if the result is `true`, and does not if the result is anything else. | ||
|
|
||
| So, if a script does `- if <sometag> == true:`, you're essentially saying `if ( true == true ) == true:` ... which is pretty silly, right? | ||
| The way the `if` command in Denizen works is it processes the arguments using logical comparison techniques, then runs the code inside unless the result is falsy<span class="parens">(the word `false`, the number 0, an empty list, and so on)</span>. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You backwards'd this, keep to true/truthy
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unbackwards'd |
||
| So, if a script does `- if <sometag> == true:`, you're essentially saying `if ( <sometag.is_truthy> == true ) == true:` ... which is pretty silly, right? | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this change just is more confusing for no particular reason |
||
|
|
||
| **NEVER** input `== true` into an `if` command <span class="parens">(or `while` or anything like it)</span>. It is always redundant. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentional blank link here got killed