snek
snek
> Except there’s no concept of a public API in CommonJS... what? how is this any different from esm? i can `export const _privateThing` and not document it, just as...
if we return the namespace object (which is what is proposed) then live bindings just work normally, so i don't think its a huge issue.
@WebReflection a, b, and c bindings you created would never change. only repeatedly accessing `requiredOutput.a` could change.
@WebReflection it's the same as `const { a } = await import('b')` vs `resultOfImport.a`. the only time declarative bindings are live is with static import (`import { a } from...
it's true if the file was the entrypoint. for node i'd rather it be called something else cuz the term main already has package-scoped meaning.
I'm not a huge fan of the concept of main. imo you should have separate files for bin and lib, which is something other languages do just fine, and installers...
i am still against the concept of a main module in general.
@SMotaal i dislike the idea of differentiating entrypoints. you can just use a separate file for your bin.
being an entrypoint doesn't inherently mean it's a cli (for example, cf workers). additionally, some hosts like browsers don't map well to the concept of entrypoints. depending on how you...
@guybedford what i'm trying to say is that because it depends on how you approach it, we shouldn't try to reify a certain pattern. if the condition for your cli...