Named Paramters

Luke Scott luke at webconnex.com
Sun Jul 12 14:05:56 UTC 2015


On Jul 12, 2015, at 2:48 AM, Benjamin Gruenbaum <benjamingr at gmail.com<mailto:benjamingr at gmail.com>> wrote:

I think my original post might have been confusing so allow me to clarify.

I'm not suggesting to add named parameters to the language, I did not intend to start a discussion about named parameters' merits vs passing an object literal (I thing Axel had a blog about that a while ago).

What I'm interested in is where the is TC standing in this regard.

 - Are there any proposals currently under work (TC's GitHub suggests no)?
 - Were there proposals in the past that were rejected or abandoned?
 - Was there discussion about named parameters in the language before?

Since I sent the original email I've found https://github.com/lukescott/es-named-arguments which isn't a proposal yet but looks pretty new, so I'll just cc Luke and see if he can update us all (although it looks like his proposal ties it to type hints) :)

At the moment my focus has been on type hints, although I've been rather busy at work. I have a few tasks to finish on that :).

The named parameters example is one rational why a space should be used for type hints instead of a colon. I had brought up named parameters on the list at some point and some people suggested destructuring instead. Personally I'd rather be able to name parameters without creating an object.

The status of the repo is it's currently a concept.

Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150712/cb43fe38/attachment.html>


More information about the es-discuss mailing list