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

Emanuel Allen emanuelallen at hotmail.com
Mon May 18 18:35:47 UTC 2015


I like to use what the language already have so if we can denote the type by constructor:

Function foo(a=Number(64),b=String()){
 return b+a;
}

Sent from my iPhone

> On May 18, 2015, at 2:23 PM, Edwin Reynoso <eorroe at gmail.com> wrote:
> 
> Don't you just mean:
> 
> ```
> function addWithType(a=0, b=0) {
>   return int64(a) + int64(b);
> }
> ```
> 
>> On Mon, May 18, 2015 at 2:16 PM, Benjamin Gruenaum <benjamingr at gmail.com> wrote:
>> What about non-default parameters?
>> 
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150518/51ae8d7c/attachment-0001.html>


More information about the es-discuss mailing list