typeof extensibility, building on my Value Objects slides from Thursday's TC39 meeting

Brendan Eich brendan at mozilla.com
Mon Aug 5 08:07:18 PDT 2013

Brian Di Palma wrote:
> Would type annotations not be a cleaner way of achieving
> discrimination between types?

The topic here was an introspective operator, typeof, or something similar.

Type annotations are a different category and even in static languages, 
do not relieve the need for introspection.

Also, type annotations to merit the name need a type system, and no one 
has found one that works for JS in full. Dart and TypeScript have 
"warning annotations" -- which also do not relieve the need for 
introspection _a la_ typeof or instanceof.


More information about the es-discuss mailing list