default parameters?

26 views
Skip to first unread message

Michael McGlothlin

unread,
Oct 7, 2015, 12:02:55 PM10/7/15
to streng...@googlegroups.com
When default parameters are supported will strong mode allow use?

One of the biggest issues I run into with strong mode right now is that I can't easily allow a function to be called with no options and do some default behavior. Without function overloading or default parameters it's easy to end up with a lot of similar functions with very similar names or verbose code full of function calls with lots of undefined or null arguments.

Andreas Rossberg

unread,
Oct 7, 2015, 1:20:29 PM10/7/15
to Michael McGlothlin, Strengthen JS
On 7 October 2015 at 18:02, Michael McGlothlin
<mike.mc...@gmail.com> wrote:
> When default parameters are supported will strong mode allow use?

Yes. In fact, it already works, when you turn on the (still
experimental) "--harmony-default-parameters" flag.

/Andreas
Reply all
Reply to author
Forward
0 new messages