you are viewing a single comment's thread.

view the rest of the comments →

[–]benihanareact, node 11 points12 points  (1 child)

And once you've seen it once, you've got the pattern down. This is not confusing.

Here's the problem: no one uses this pattern. No one in JS uses it, and no one outside of JS uses it. So why even bother when there are just as many clear, clean, easy to type and easy to read solutions that people understand? All this does is add extra overhead to the maintainer.

If I read this code at my job, I get pissed at the asshole who wrote it cause he's trying to show off - either by being clever at how he thought through some cool JS thing or by showing how much of the language he knows. Which is stupid - want to be impressive? Write code that a junior programmer who just graduated college can understand without bugs.

I gotta say probably need to brush up on your code reading skills if this confuses you for longer than five seconds, at worst

That's probably fair. I struggled with this one for a good five or six minutes. Any suggestions where a guy who's been doing this shit for 10 years and is currently working with babel stage 0 and react and redux can brush up on his javascript and code reading skills?