On Fri, May 27, 2011 at 1:24 PM, Sam Tobin-Hochstadt <[email protected]> wrote: > On Fri, May 27, 2011 at 4:03 PM, Peter Michaux <[email protected]> wrote: >> On Fri, May 27, 2011 at 12:55 PM, Sam Tobin-Hochstadt <[email protected]> >> wrote: >>> On Fri, May 27, 2011 at 1:59 PM, Peter Michaux <[email protected]> >>> wrote: >>>> >>>> A minifier could, couldn't it? >>>> >>>> function foo(a::MyType) {} >>>> >>>> would be minified to >>>> >>>> function foo(a) {} >>> >>> These are not the same function at all. >> >> Why? > > Because foo(7) produces a TypeError in one, and |undefined| in the > other (assuming that MyType isn't Number).
Yes but I was thinking of the use of guards as a debugging/development tool. During development you can verify that foo is never called with bad values. Then during production, those checks do not need to be performed. By removing the debugging checks for production, this would save wire and execution time. Peter _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

