What’s the best name for keyword parameters?

Brendan Eich brendan at mozilla.org
Thu Aug 2 21:44:38 PDT 2012


We don't have a proposal for named parameter passing in call 
expressions. Object literals take away all the oxygen in that room. 
WebIDL calls these dictionary parameters, IIRC.

I agree "keyword" is not the right word. Named parameters were part of 
original ES4/JS2:

http://web.archive.org/web/20030216220908/http://www.mozilla.org/js/language/js20-2002-04/core/functions.html#parameters

/be

Axel Rauschmayer wrote:
> The term “keyword parameters” comes (AFAIK) from Lisp. I have seen 
> Brendan use it and have also used it myself [1]. Can we do better? 
> jQuery talks about “options objects”. Hence keyword parameter = 
> option? But that clashes a bit with optional positional parameters.
>
> [1] http://www.2ality.com/2011/11/keyword-parameters.html
>
> -- 
> Dr. Axel Rauschmayer
> axel at rauschma.de <mailto:axel at rauschma.de>
>
> home: rauschma.de <http://rauschma.de>
> twitter: twitter.com/rauschma <http://twitter.com/rauschma>
> blog: 2ality.com <http://2ality.com>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss


More information about the es-discuss mailing list