4 ms·
> why does Node need file extensions when Other languages don't? Node allows you to require things that aren't commonjs javascript. (json, native extensions, e
by snek 8y ago
> why does Node need file extensions when Other languages don't?
Node allows you to require things that aren't commonjs javascript. (json, native extensions, etc).
> when Ryan dahl announced Deno, he mentioned [removing extensionless resolution] as an obviously good change
I think a lot of people disagree with ryan dahl in this case (I certainly do). The ability to have a dependency expose an interface without knowing what type of thing that dependency is is very powerful, and i think it is one of the reasons people like require so much.
- ng12 8y ago> The ability to have a dependency expose an interface without knowing what type of thing that dependency is is very powerful Is it? I honestly can't say I've actually used that feature -- although I can say I have gotten burned by it by accidentally importing the wrong thing.