Re:Deno raises $21M
by alexwebb2 on Tuesday June 21, 2022 @06:32PM
(#31829847)
JS modules can produce side effects on load. Does that present an obstacle to that kind of REPL pattern?
[ Parent
| on HN ]
I don't think so.
Most repls use a special in repl keyword to accomplish this.
For some reason the JS community can't move past "but modules are special". Ocaml has modules too and the repl can reload stuff from a file no problem.
Naive question, but is that dictated in the spec? Probably?
Just wondering that, since Deno is rewriting all of npm anyway, it would have been a great time to revisit some of these historical script-y design decisions, to make JavaScript/TypeScript-at-scale suck less.
Granted, probably too late now, but as-is neither of Deno's url-based imports or sandboxed-by-default changes has seemed worth the migration cost.
But, if they also made something like "everything hot reloads for free" level ergonomic/platform changes, then yeah, I'd be hopping over.