3 ms·
Does this mean we can finally get a REPL where a file can be loaded, modified, then reloaded, without having to restart the whole thing? Seriously my biggest p
by LAC-Tech 4y ago
Does this mean we can finally get a REPL where a file can be loaded, modified, then reloaded, without having to restart the whole thing?
Seriously my biggest pet peeve with both deno and node.js. In every other REPL I've used this is basic functionality. When I talk about this to JS people they look at me like I'm from mars.
- alexwebb2 4y agoJS modules can produce side effects on load. Does that present an obstacle to that kind of REPL pattern?
- LAC-Tech 4y agoI 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.
- stephen 4y agoNaive 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.
- johnspurlock 4y agoDeno has a built-in repl https://deno.land/manual/tools/repl https://deno.land/manual/tools/repl
- LAC-Tech 4y agoWell thanks for reading the first 9 words of my post at least.