Symbols are really a cool feature, although I guess they're not that much used since basically using Symbol.toPrimitive and Symbol.toStringTag is globally the same as using valueOf() and toString() (although like you said there's a few differences).
More features is always a plus, since it allows you to bend the languages to your will rather than the contrary.
That's why I'm kind of sad that with was trashed out. I understand why some people didn't like it, but a shame it didn't stick around. Would have been quite cool to use with (this) in ES classes to mimic other languages like C++ or Java where this is implicit inside a class.
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.
Nice article !
Symbols are really a cool feature, although I guess they're not that much used since basically using
Symbol.toPrimitive
andSymbol.toStringTag
is globally the same as usingvalueOf()
andtoString()
(although like you said there's a few differences).More features is always a plus, since it allows you to bend the languages to your will rather than the contrary.
That's why I'm kind of sad that
with
was trashed out. I understand why some people didn't like it, but a shame it didn't stick around. Would have been quite cool to usewith (this)
in ES classes to mimic other languages like C++ or Java wherethis
is implicit inside a class.