DEV Community

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

 
phlickey profile image
Phil

It's an interesting idea, and as you say above, one of the reasons JS is now so ubiquitous is that you can mould the language in whatever shape you like just through coding style. I will, probably keep using this in my react components, and when doing anything that feels like it should be more object oriented, but it's great to have alternatives, and as functional dialects become more widely adopted, and thus more legible, I'm sure it's usage will probably decline anyway.

While this is a really interesting thought exercise about how different language features affect the code we write I don't think it'll affect the code I write today.

Thread Thread
 
phlickey profile image
Phil

Also, practically burst out laughing reading that article about null:

If a property of an object doesn’t exist, JS returns a value to indicate the absence. The designers of JavaScript could have chosen this value to be null.
But instead they worried about cases where the property exists and is set to the value null. In a stroke of ungenius, JavaScript added undefined to distinguish a null property from a non-existent one.
But what if the property exists, and is set to the value undefined? Oddly, JavaScript stops here, and there is no uberundefined.

Thread Thread
 
joelnet profile image
JavaScript Joel

Haha ya seriously. if NULL wasn't bad enough, we got stuck with two of them! lol

Thread Thread
 
phlickey profile image
Phil

Two values that don't have values and one number that isn't a number. Again, we get paid to make arrangements of minerals dream about words we write. It's not related, but I feel like every conversation about coding should be had in this context.