Hacker News new | ask | show | jobs
by kristaps 1076 days ago
For all the things wrong with node, I envy the relative filename importing they have when writing Python.
1 comments

when I moved from Python to NodeJS years ago the way that `require( './path/to/file.js' );` works was a total revelation. There are still arguments being mafe about NodeJS's `require` rules being too complicated (e.g. using optionally implicit extensions) but even with that, NodeJS's `require()` method is hands down superior to Python's `import` statement.