Lead Developer: Adobe Experience Manager.
Father of one.
Minnesota.
Occasionally write here: ahmedmusallam.com and there: https://blogs.perficientdigital.com/author/amusallam/
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.
Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
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:
Does that look complicated?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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:
Does that look complicated?