Conversation

JavaScript, through “require” in Node.js. Since it was user-land implemented, it had exact same scope semantics, syntax, etc. as any other variable. No “magic outside the language” shenanigans (just the FS). But then “import” came along and broke everything.
Quote Tweet
What programming language really got import statements right? (In terms of syntax or functionality)
2
9
Note *all* the special features that need to be accounted for in import (often with custom syntax) just to match what the community was able to do for free with require: supporting file resolution (import maps?), supporting other file types (json), transpilation, etc.
1
4