I see the current state of ES6 modules as doubling down on @substack's philosophy of small modules with few exports.
-
-
@wycats "Encourage" assumes that single export is the better choice in all or almost all cases. -
@jankrems either single or a small number of named, yes. Almost never gargantuan modules like fs. -
@wycats What about "talking" modules like assert.equal, async.map? Seems like stepping back into pre-namespace C land. -
@jankrems what's a talking module? -
@wycats A module name that is part of the "sentence". "Assert [that it's] equal" -> `assert.equal`. -
@wycats I'm not saying that single export is bad and/or shouldn't be the default case. Just that "namespaced import" has real use cases. -
@jankrems It has real use-cases but really complicates the import model. Are you importing a thing or a bucket of things? -
@jankrems We previously had a syntax for the "talking" style, and removed it (recently) because people said it was confusing. May return!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.