Type Parameters are Completely Unnecessary
brendan at mozilla.org
Tue Mar 4 23:31:06 PST 2008
On Mar 4, 2008, at 11:24 PM, Darryl wrote:
> << The benefits of a compile-time check over a runtime
> check include
> performance and type safety. >>
> As a JS programmer I can't see any way in which you
> can compile-time check anything other than a static
Strict mode is optional for development time, not for deployed code.
Unlike static languages, strict mode has loopholes, so you don't need
to type everything to get benefits from the static checking.
> and thus I can't see how this would be of
> any benefit at all performance wise.
Who said anything about performance?
Not I; I've said before that types have little to do with
performance, although straightforward use of types and early binding
can help some implementations go fast. Performance through (optional)
static types has never been the motivating reason for ES4's type system.
> As for type
> safety, that's an implementation problem afaic, not a
> design problem.
This is clearly false. Type safety depends on specified language
design (e.g. covariant argument subtyping in early Eiffel), not on
implementation. But I am not sure we are speaking the same language,
so I'll stop here.
More information about the Es4-discuss