Hacker News new | ask | show | jobs
by kitsonk 1602 days ago
I would argue it isn't very custom. Using fully qualified URLs predates Node.js and CommonJS. It was also one of the big debates when we all were doing AMD. Node.js has realised that _mistake_ of eliding extensions and is headed that direction as well.

We have been adding a Node.js compatibility mode, but I am not sure that qualifies as "_very_ custom module resolution".

Both the triple-slash reference and @deno-types were solutions to problems to not have opaque type resolution with TypeScript. They do not impact the runtime resolution, only the type check resolution. Instead of opaquely searching for these by reading the `package.json` and probing the file system like `tsc`, Deno is explicit.

I would be glad to work with you to explore how we can figure out how to resolve your implementor concerns. The door has been open for a long time, and I have mentioned it in passing to Daniel a couple times. Let me know if you would like to talk.

1 comments

this is web dev mindset, in all other languages the module name is just a name, it's not supposed to tell you how to retrieve the module, that's the job of the module system. Otherwise it's the service locator anti pattern. I always find it redundant that syntacically, the module name in javascript has to be a string (as in quoted) for whatever reason. In python and php it's just tokens and namespace separator.