News for hackers. Stuff that matters.
Re:What is a Source Map by Drup on Wednesday November 15, 2017 @05:37AM (#15702809)
This is true as long as you stay in the language.

When you start binding to JS libraries, all hell break loose and you have to track down undefined and nulls that slip into places they shouldn't, because most JS libraries are poorly written.

I only have experience with js_of_ocaml, which has fairly good support for source maps .... after a painful setup phase. It does help a lot for bindings though.

Re:What is a Source Map by vog on Wednesday November 15, 2017 @06:03AM (#15702923)
> js_of_ocaml, which has fairly good support for source maps

Wow. That must have changed in the meantime.

Bucklescript seems to be the way forward, and much better than js_of_ocaml. But that's hearsay. Anyone with actual experience in bucklescript?

> you start binding to JS libraries, all hell break loose and you have to track down undefined and nulls that slip into places they shouldn't, because most JS libraries are poorly written

If the interface to that JS library is not performance critical, couldn't you just setup a thin wrapper and communicate to the library via JSON structures? Then, your OCaml code could treat it like any other (potentially buggy) external source.