Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
4
Newest
 Critic
Impact
~175 people reached

  • 0 posts edited
  • 0 helpful flags
  • 8 votes cast
Jan
9
comment One-line functions that are called only once
@Wolf Hey man, yeah. I wrote this quite a while ago :) I definitely do things quite differently now days. In fact, looking at the label content to see if there was an error makes me cringe... Why didn't I just return a bool from CheckInputs()???
Dec
12
comment Why there are no compound assignment operators for logical operators (such as ||, && etc)?
I think you misunderstand the meaning of "mathematical", perhaps you have heard of boolean algebra. I agree the coercing a non-boolean in order to use ||= as a null coalescing operator is not intuitive and in fact looks obtuse in code-form. Where it does become useful is when you are attempting to do boolean math. function fulfill(inValue) { if(resolved || rejected) return false; /* Do stuff here */ return true; } resolved ||= fulfill(value)