Optional argument types
Brendan Eich
brendan at mozilla.org
Tue Sep 25 12:54:22 PDT 2012
Andrea Giammarchi wrote:
> then how about forgetting ducks and classes, going typeof without
> implicit cast?
No.
Why the desperation to get something -- *anything* -- even a half-baked
idea based on broken old typeof? Where's the fire?
Sorry, at this point in the thread I have to start pushing back!
> function doStuff(i:number, key:string, u:undefined, b:boolean,
> fn:function):object {}
>
> where `null` will still be under the object type.
>
> Would this be a decent compromise or a pointless effort for no benefits?
The latter -- sorry, have to call it as I see it. You've heard from
Andreas, Alex, and Allen too.
Types are hard. This doesn't mean "no, never". But big brains are still
researching the general topic, and btw what Dart has can't be called
types according to the researchers and literature I trust.
be
More information about the es-discuss
mailing list