Hacker News new | ask | show | jobs
by ht85 3478 days ago
Do you really think it's good practice to use comments to describe how the language itself works? It's not like you can't find comprehensive, quality documentation for every single thing that happens in that function on MDN or equivalent.

Is that function that insane? I can understand it at a glance, and performance is high (it matters here). AS a JS programmer, just knowing that it is an implementation of bind() should be enough of a hint that it uses its first argument as context, the rest as a curry and the arguments of the newly generated function as additional arguments.

1 comments

To be fair, the syntax of the variable initialization could be separated into 3 lines for better clarity.