Modules: Curly Free
dherman at mozilla.com
Sat Apr 20 18:25:59 PDT 2013
On Apr 20, 2013, at 10:36 AM, Kevin Smith <zenparsing at gmail.com> wrote:
> Yeah, but it's a false dilemma, I think. No trivial naming convention is necessary, and no ad-hoc syntax is necessary. Asking the developer to name a thing with a well-chosen identifier is completely reasonable in my book.
I don't really know how to answer opinions like this. It just seems like... it's fine that you feel that way, but kind of irrelevant. Significant communities of JS developers have already spoken -- in words and in precedent -- that they disagree with you. So for both smoother interoperability and continuing to support what is a highly valued use case, it's a tiny price to pay.
> Further: with the right syntax in place exporting more than one thing will likely cease to be an anti-pattern.
This misunderstands the value of anonymous export. There's a reason I call it "anonymous" and not "single." This is about having a "main" export, a common case. Even when there's a very low cost to having multiple exports, it's still extremely common for a library to have a particular operation you want to use 90% of the time. So whether you have 1 export or 100, there's still value in anonymous export.
More information about the es-discuss