Consider javascript already support for default parameters, so maybe we can use the default parameter to specify the strong type.

罗勇刚(Yonggang Luo) luoyonggang at gmail.com
Wed May 20 13:10:41 UTC 2015


Well, native support means better performance for browsers.

2015-05-20 17:02 GMT+08:00 Gary Guo <nbdd0121 at hotmail.com>:
> If strong type is needed, why not use TypeScript?
>
>> From: luoyonggang at gmail.com
>> Date: Mon, 18 May 2015 01:50:34 +0800
>> Subject: Consider javascript already support for default parameters, so
>> maybe we can use the default parameter to specify the strong type.
>> To: es-discuss at mozilla.org
>
>>
>> For example:
>>
>> function addWithType(a = int64(0), b = int64(0)) {
>> return a + b;
>> }
>>
>> This function is input add two int64 and return a int64
>>
>> --
>> 此致
>>>> 罗勇刚
>> Yours
>> sincerely,
>> Yonggang Luo
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss



-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo


More information about the es-discuss mailing list