Message from JavaScript discussions
September 2018
— That's just how I architect things
I just write in a way that makes it irrelevant if short circuited. Fortunately some of my tools behave similarly.
—
m(
'div',
[
m(<element>),
false, // ignored
m(<element>),
m(<element>)
]
)
— Mithril
— Imo using an expression itself as control flow is wrong, while using the result of the expression in control flow is correct
— You have to consider that the operator is taking the values as inputs, doing extra operations even after the desired side effect (assignment) happens
— It's just a nit pick I have, I am too aware of all the details from the spec so I am always trying to avoid inefficiency, but aside from that I feel it makes code less readable too
— He reuses them in big functions m8.... as in for different types depending on where in the function you are
— Agreed
— But I chose the second solution
— Instead of using if....
— Always use the result