DEV Community

Discussion on: Rethinking JavaScript: The complete elimination and eradication of JavaScript's this.

Collapse
 
dechamp profile image
DeChamp

in regards to your statement....

"I find your language of "excessive amounts of additional code" to be either an extreme exaggeration or a vast misunderstanding.

nothis is just a function. A SMALL function. The function takes 1 argument and returns 1 argument. It is one of the most simple of functions that you can call."


this is NOT a simple small function. It's a function that calls other functions and also includes lodash.

I honestly like what you did, it's clever and in some scenario could be helpful but I think you need to avoid writing an article that could lead new devs in to thinking that "this" is a horrible thing to use.

I feel more people would have been on board if you presented it in a manor of "hey, 'this' can be a headache but I have an alternative solution you can try".

I know it has to be frustrating to have an opinion and feel like people are shutting you down.
I'm not trying to say "you're wrong, I'm right!". Simply stating that if you present your argument as a "you are all wrong, this is the right way" then you will definitely meet some resistance.

Your library should be in production and used by thousands of developers before you start making it's a "suggested way". There are far too many scenarios where you're library could cause more harm than good and you are not even aware of those yet. Sure you'll fix them as them come, but you haven't had enough run time for you to even know what they are.

Keep up the good work, don't let our comments get ya down. Be open to what the community has to say. You rock. Have a good day.

Thread Thread
 
joelnet profile image
JavaScript Joel

this is NOT a simple small function. It's a function that calls other functions and also includes lodash.

Ahh very true, very true. Though it doesn't include the entire lodash library. Only the clone function is included. This was safer that writing my own clone function.

Your library should be in production and used by thousands of developers before you start making it's a "suggested way".

I'll agree with this too. But I'm stuck with a catch-22. Nobody will use it unless everyone is using it. So the only way to get everyone to use it is if everyone is using it.

Maybe a labeling of experimental? I'll think about this.

I know it has to be frustrating to have an opinion and feel like people are shutting you down.

Not at all. I understand the way comments or reviews work. If you are happy, you move on. If you disagree, straight to the comments! When people comment it gives me and opportunity to clear up any confusions that may exist!

The first thing I would teach is how to write software without the need for this. nothis should be a library when you are stuck with this due to circumstances out of your control.

Feedback much appreciated :)

Cheers!

Thread Thread
 
dechamp profile image
DeChamp

Thanks for taking the time to reply to everyone! I think people will use it and maybe even offer to add to it. I know half of the people I've talked to still struggle with this....

Thread Thread
 
joelnet profile image
JavaScript Joel

It's a longer conversation that goes beyond the scope of this article. Even though we've all read the Billion dollar mistake articles, we all continue to use NULL. Even I still do. I look at it now and grimace, but I still use it.

I know exactly how I would replace it in my code too. I'd use a Maybe with a Just and Nothing. But... in a lot of instances, I still don't. This is one of the next things I want to correct in my code. The elimination of any NullReferenceException.

There are a lot of things I feel this way about. Who knows. Maybe when I am done I won't be using anything except combinators. lol. (please no).

Until then all we can do is try to be better every day.

Cheers Amigo!