DEV Community

Discussion on: Function.bind.bind does not work in JavaScript

 
dexygen profile image
George Jempty • Edited

I've heard of eating your own dogfood before, but not drinking your own Kool-Aid. Seriously I've had a look at "nothis". It's verbose, it's implicitly magical, all it does is replace this with ctx, etc. These are not formulas for success in my opinion.

Thread Thread
 
joelnet profile image
JavaScript Joel

It promotes the context from the side loaded this to a full fledged variable.

This behaves in a way similar to ReasonReact.

It is used as a last resort for when you must use this.

The first and best option is to write your software without this.

 
akashkava profile image
Akash Kava

If this in JavaScript would be same as in other language, why would someone use JavaScript? Power of JavaScript is due to this, otherwise, all nothis and such things are also possible in other languages as well with some tweaks. There is no fun in not using this.

this is cancer only for you, not for everyone !! And it will not become cancer for everyone by shouting it out loud.

Thread Thread
 
joelnet profile image
JavaScript Joel

Power of JavaScript is due to this

Disagree. The power it JavaScript is it runs almost everywhere. It's power is also in it's flexibility on how you like to code. this causes more problems than it solves.

this is cancer only for you

False. Read stack overflow. Google. You'll find many thousands of posts with people having problems with this.

Thread Thread
 
dexygen profile image
George Jempty

Just because thousands of programmers have a hard time reasoning about threads in Java, should they be eliminated?

Thread Thread
 
joelnet profile image
JavaScript Joel

If there are roads to take and one causes less flat tires, which road would you choose to take?