Optional argument types

Andrea Giammarchi andrea.giammarchi at gmail.com
Tue Sep 25 13:03:18 PDT 2012


well ... I was asking indeed why that was not even an option ... is not
half backed being typeof the most used check ever for arguments and
variables but I got your point :-)

br

On Tue, Sep 25, 2012 at 8:54 PM, Brendan Eich <brendan at mozilla.org> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120925/f476757c/attachment.html>


More information about the es-discuss mailing list