I don't think you're counting all the costs correctly. In a non-default world, the module has to come up with a name.
-
-
Replying to @wycats @mweststrate and
I also don't think this hazard is what you're implying. I've written huge JS module codebases for years and the first thing I do...
1 reply 0 retweets 0 likes -
Replying to @wycats @mweststrate and
...when I want to know what a name is is to ask vscode to jump to the import. Named or default doesn't make that much difference ...
2 replies 0 retweets 1 like -
Replying to @wycats @robpalmer2 and
No I didn't want to imply the difference is huge ;-). Just don't see any value in consumer provided names, except when there are collisions
1 reply 0 retweets 0 likes -
Replying to @mweststrate @robpalmer2 and
I think consumers should probably use the same name as the module as a general rule, but don't think it's that important that they're unique
1 reply 0 retweets 1 like -
Replying to @wycats @mweststrate and
Module names should be globally unique, names inside of them are always 100% resolvable locally so I don't see the big deal.
1 reply 0 retweets 1 like -
Replying to @wycats @mweststrate and
I think you're undercounting programming styles where nearly all modules have a default export and nothing else.
2 replies 0 retweets 1 like -
Replying to @wycats @robpalmer2 and
That might be true. I'm on huge TS stuff, where most modules also expose at least some interfaces around the main export
2 replies 0 retweets 0 likes -
Replying to @mweststrate @wycats and
And in an ideal world I think we shouldn't have filenames in the first place in our code bases :-P. The are just an OS artifact.
1 reply 0 retweets 0 likes -
Replying to @mweststrate @wycats and
But have to go AFK practicing talk ;-)
1 reply 0 retweets 0 likes
I gotta sleep, but I strongly disagree re: filenames. At minimum, gotta deal with the real-world fallout from smalltalk.
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.
