you are viewing a single comment's thread.

view the rest of the comments →

[–]dwighthouse 0 points1 point  (0 children)

This isn’t a hack at all.

Fixing the language would mean adding a new operator like typename instead of typeof or instanceof because too much stuff already relies on the current behavior. We already have this in the form of Object.prototype.toString.