How do you distinguish between `function f(a = defaultComesFromEvaluatingSomeFunction(true))` from `function f(a = StrongType(true))`?
It’s ambiguous which one is meant, and that doesn’t really work. > On May 18, 2015, at 2:35 PM, Emanuel Allen <[email protected]> wrote: > > 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 <[email protected] > <mailto:[email protected]>> 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 <[email protected] >> <mailto:[email protected]>> wrote: >> What about non-default parameters? >> >> _______________________________________________ >> es-discuss mailing list >> [email protected] <mailto:[email protected]> >> https://mail.mozilla.org/listinfo/es-discuss >> <https://mail.mozilla.org/listinfo/es-discuss> >> >> >> _______________________________________________ >> es-discuss mailing list >> [email protected] <mailto:[email protected]> >> https://mail.mozilla.org/listinfo/es-discuss >> <https://mail.mozilla.org/listinfo/es-discuss> > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

