IDE support?

Claus Reinke claus.reinke at
Tue Sep 13 01:30:05 PDT 2011

>> Improved, statically checkable, types would also help mitigate
>> Javascript's silent failures (silently breaking code when trying to
>> refactor, fixing bugs, or adding features). Unless the type system
>> is fairly advanced, type safety only expresses a thin veneer of
>> invariants, but coverage is total, and automatic.
> I'm sorry, but as much as I want a type system, the idea of a 
> "thin veneer" that imposes an ongoing tax at *all* declaration 
> and usage sites is really distasteful. JS should do better than 
> Java and it's ilk have managed.

Why are you trying to misinterpret me? My inspiration for a
useful type system would be Haskell (certainly not Java), and
it is likely that any JS type system will be less advanced. So it
will be able to express fewer program properties, hence only
replace a weak/thin level of testing. But if done right, that level 
of testing will still cover the whole program, without coders
having to include needless declarations, because type inference
will connect the dots.

That also answers another common objection: useful type
systems do not render testing superfluous, but they allow
test suites to focus on more interesting aspects of your code,
because the basics are covered by the type system (and that
coverage includes source and path coverage).



More information about the es-discuss mailing list