r/webdev • 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.html5
u/Sandurz Sep 19 '16
I get where he's coming from and this is far from the worst dive into Functional Programming thinkery examples but I also like the idea of criticizing code based on my own hypotheticals and will apply this to help threads around this sub from now on.
Yeah that JS would work in most cases but I recompiled a special version of Chromium where the Array constructor returns an immutable string containing the lyrics to all three theme songs to the Drew Carey Show so no dice
Yes, your CSS might normally be valid but you neglected to consider that when I checked out your CodePen I loaded up the plain text onto my Lego Mindstorms and had it speak each individual character to me one by one as it drove circles around my kitchen so I honestly have no idea
1
u/fagnerbrack Sep 19 '16
This is a x-post from /r/javascript.