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

Axel Rauschmayer axel at rauschma.de
Thu Aug 2 22:55:33 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.

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

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120803/7a06cdb0/attachment.html>


More information about the es-discuss mailing list