Argument matching

Lars Hansen lhansen at
Fri May 9 11:21:03 PDT 2008

There are optional and rest arguments in ES4.

Regarding error reporting, strict mode is what gives you sane error
checking (generally at run-time).  Standard mode is for all you cowboys
out there.


> -----Original Message-----
> From: David Mandelin [mailto:dmandelin at] 
> Sent: 9. mai 2008 10:58
> To: es4-discuss Discuss
> Cc: Lars Hansen
> Subject: Re: Argument matching
> Lars Hansen wrote:
> > I would expect excess arguments to typed functions to be ignored 
> > silently, as they can be picked up by 'arguments' inside 
> the function.
> >
> >   
> Is there any possibility of making whether a function takes 
> extra arguments part of its type? It seems kind of 
> unfortunate not to be able to report an error when too many 
> args are given, which is a pretty common mistake and usually 
> indicates a bug.
> Dave

More information about the Es4-discuss mailing list