Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

How to handle the fact that js and js libs are throwing exceptions all over?

$
0
0

You should deal with same situation while you’re working in Rust or even Erlang or Haskell if there is any unsafe external binding or embedded asm

I have very similar approach @jderochervlk mentioned above, isolating core parts from all externals is important to you keep sound runtime.

Elm provides “sandbox” for this by default, meanwhile we should do it optionally by own code architecture. It’s the choice.

Adding some “safety” to every individual external library is very expensive. On the other hand, you can easily make it not a concern of the ReScript module by inversing the dependency. Of course, it is still your responsibility to verify the stability of the entire integrated system, but at least it can be much easier.

IMHO this is a system architecture problem, and not something a programming language can inherently solve (but just hint)


Viewing all articles
Browse latest Browse all 2592

Trending Articles