5 ms·
For the inevitably "what differentiates this from node?" Single executable Allows imports from url File system & network Sandboxing is controlled with flags Di
by tfolbrecht 7y ago
For the inevitably "what differentiates this from node?"
Single executable
Allows imports from url
File system & network Sandboxing is controlled with flags
Dies on uncaught errors
https://deno.land/manual.html#introduction https://deno.land/manual.html#introduction
- carlmr 7y ago>Dies on uncaught errors how can JS programmers deal with this?
- PudgePacket 7y ago... catch the errors?
- carlmr 7y agoIt was rhetorical and meant to be facetious.
- hombre_fatal 7y agoOn HN it's better to just share your point rather than obfuscate it with sarcasm and rhetoric.
- novaleaf 7y agoon node, this can actually be very difficult or even impossible if using 3rd party libraries. For example, some node internals like networking require the invoker to attach to some obscure .on("error") event to avoid uncaught errors. and a lot of the time these 3rd parties are not aware of it. I'm all for deno being built from the ground up to properly crash on uncaught errors. Silent ignoring is a really stupid decision.
- spion 7y agoI never understood why this is necessary. Using promises means you get to use try-with-resources style construct for handling non-memory resources safely. As such you no longer need to crash on uncaught errors, except errors pertaining to resource disposal.
- novaleaf 7y agoi think the reason is that, in my example of networking, the network i/o is an "interupt" kind of event, that is triggered outside of normal execution. like if there's a socket timeout. probably didn't have to be designed this way, but it was designed pre-promises and I guess they are lothe to change it.
- carlmr 7y agoYeah, I'm a huge fan of erroring out properly. It makes it much easier to find problems before they cost money. I think the erlang/elixir model of fail fast and try to restart is the best for availability.
- mattlondon 7y agoI would imagine you have a watchdog of some sort (perhaps a special URL) and have something probe that every 15-60 seconds etc to see if it is up, if it does not respond then spin up a new instance and kill the failed instance. Cattle not pets!