r/node • u/fagnerbrack • Sep 19 '16
Is your JavaScript function actually pure? Or does this function behaves like a Mathematical Function in all the situations I will encounter in my code?
http://staltz.com/is-your-javascript-function-actually-pure.html
0
Upvotes
4
u/mushishi78 Sep 19 '16
This was a waste of time. If the consumer gives something silly, it's they're fault. Just says it's pure and move on with your life.
2
u/fagnerbrack Sep 19 '16
I agree with the principle to blame the consumer and document the contract, but disagree that it was a waste of time. It is actually an interesting point of view.
2
u/fagnerbrack Sep 19 '16
This is a x-post from /r/javascript.