DEV Community

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

 
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!