Comment

Comment by StreamBright

Have you seen ReasonML?

  [@bs.val] external pi : float = "Math.PI";
  let tau = pi *. 2.0;
  [@bs.val] external alert : string => unit = "alert";
  alert("hello");
Elm was trying to make it very hard to use JS in Elm which is always a bad idea when you are a transpiled language. Clojure is so popular because you have access to most of Java and the libraries written in Java. ReasonML makes super easy to use JS (or other languages, same FFI interface) while being an ML family language just like Elm. For me ReasonML is clearly the winner of type safe JS for these reasons.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton