And because node genuinely came up with new ideas that made the ergonomics better using the dynamic tools they had at the time.
-
-
Replying to @wycats @littlecalculist and
People conflated the dynamic tools with the programming model, but default export is a genuinely good idea we wanted to adopt.
1 reply 0 retweets 5 likes -
Replying to @wycats @littlecalculist and
Love default exports - crazy that the TypeScript folks dislike it.
3 replies 0 retweets 1 like -
Replying to @AdamRackis @littlecalculist and
They do? Maybe because it's harder to quick fix?
1 reply 0 retweets 0 likes -
Replying to @wycats @littlecalculist and
They say "you can't rename" but they mean "I want all default imports always use the same name" -
@mweststrate hope I'm not misrepresenting1 reply 0 retweets 0 likes -
-
Replying to @wycats @littlecalculist and
import Foo from "./foo" What if, inside foo.js you rename class Foo to class Bar Old imports will still work w/ old name: they no like
2 replies 0 retweets 0 likes -
Replying to @AdamRackis @littlecalculist and
You mean you rename export default class Foo ?
2 replies 0 retweets 0 likes -
Replying to @wycats @littlecalculist and
Exactly - they dislike that export default class Foo can be imported with a different name, ie import Fooooo from "./foo"
1 reply 0 retweets 0 likes -
Replying to @AdamRackis @littlecalculist and
Feature not a bug. What if I rename foo.js to bar.js and have export class Foo {}?
2 replies 0 retweets 1 like
The point of default export is "the module name is the name of the object, and you don't need to say it twice"
-
-
Replying to @wycats @AdamRackis and
Use list::List pattern in rust sucks so much people (including std) use the facade pattern to avoid it.
0 replies 0 retweets 1 likeThanks. 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.