re: Rethinking JavaScript: The complete elimination and eradication of JavaScript's this. VIEW POST

VIEW FULL DISCUSSION
 

This is very cool, and I understand the issue and your solution. However, my problem with it is readability. Isnt it a lot easier to reason about “function(){}” than to perform the ceremony of calling notThisAll? Or fixThis?

Your proposal is really cool, it would take some getting used to. But if your worry is the novice developer, if they see this for the first time, they still have to lookup and understand what it means. Also, most code examples online will not have your library.

I’d argue that the time spent debugging the annoying issues of “this” is time well spent! That way you learn the ins and outs of the language.

 

There are pro's and con's to everything in this world. So for me to say nothis doesn't come with a cost would be a lie. There is a cost for sure. And you have to weigh the pros and cons before considering it for a project. This should be true with every library, or even design pattern.

Have a look at this:

no this demo

Does that look complicated?

code of conduct - report abuse