On 2014-06-14, 10:58 PM, Robert O'Callahan wrote:
Looks good.

A classic problem we have had is with boolean parameters, which are hard
to read at call sites. We currently solve that by turning them into enum
or flag parameters, but named parameters would be a lighter-weight
alternative. However, it would be great to be able to ensure at the
language level that certain boolean parameters are passed as named
parameters.

FWIW I have thought about adding a way to require the usage of names for some arguments with this specific use case in mind, but I've been ignoring it for the initial version of the proposal. It might be something that we can add in when we have a real proposal for the committee.

Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to