Received some replies about how it's faster. If that is the primary reason you use them then it screams of premature optimisation.
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Do you also do `=== true`? Definitely better in untyped JS dialects.
-
I'm starting to. Haven't really thought about it much but now that it's front of mind I'm doing it more. I'm using
@flowtype too. - 1 more reply
New conversation -
-
-
I've started doing so as well, mostly as a reaction to the new, excellent,
@flowtype warnings.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
i haven't gone that far, but i have come to believe [...].length > 0 is better than [...].length
- 1 more reply
New conversation -
-
-
doing the same for zero checks communicates intent better too IMO
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
That's how I used to do it then people told me that looks weird. So I changed. Now I'll change back & if anyone asks I'll tell them kittens
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Most of the JavaScript code is doing poor typechecking in runtime
-
`new Boolean(true) === true` evaluates to `false`. Exactly what you wanted right :D
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 