Re: What’s the best name for keyword parameters?

Alex Russell alex at dojotoolkit.org
Fri Aug 3 01:34:46 PDT 2012


There is a long history of TC39 naming things for internal use and those names never escaping to the common lexicon. I'm not sure it's a thing we need to (or even should) weigh in on via the spec.

On Aug 3, 2012, at 6:55 AM, Axel Rauschmayer <axel at rauschma.de> wrote:

>> 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.
> 
> Yes, I agree and approve. Together with destructuring that is quite OK.
> 
>> I agree "keyword" is not the right word.
> 
> Suggestions for better terms welcome. Property parameters? Inside a parameter object?
> 
>> 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

--
Alex Russell
slightlyoff at google.com
slightlyoff at chromium.org
alex at dojotoolkit.org BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723



More information about the es-discuss mailing list