4 ms·
And if you're working on web apps, look at Ur/Web[1] which also uses MLton. It is what Opa should have been and has a very nice model. [1] https://air.mozilla.
by cm3 10y ago
And if you're working on web apps, look at Ur/Web[1] which also uses MLton. It is what Opa should have been and has a very nice model.
[1] https://air.mozilla.org/ur-web-a-simple-model-for-programming-the-web/ https://air.mozilla.org/ur-web-a-simple-model-for-programmin...
Edit: Ur/Web takes inspiration from Haskell, SML and OCaml, and is arguably an improved substrate of the good features of those. It's definitely the nicest tool I know of for writing web apps at the moment.
- eatonphil 10y agoYou can also compile Standard ML to Javascript using SMLtoJS [0] via MLKit [1]. melsman even has an online IDE [1] with which you can play around with his reactive web stuff. [0] http://www.smlserver.org/smltojs/ http://www.smlserver.org/smltojs/ [1] https://github.com/melsman/mlkit https://github.com/melsman/mlkit [2] https://smlserver.org/ide/ https://smlserver.org/ide/
- aseipp 10y agoI'd agree, but Ur/Web gets more difficult when you consider that it's extremely CRUD focused due to the way page handling and 'memory regions' in the implementation work, and how deeply ingrained this is with its transactional view of the world. It doesn't even have a garbage collector. Shoehorning anything 'non-transactional' into the `transaction` monad (like sending email, writing to disk or firing the nukes) can range from achievable to very difficult to "fuck it, just use the database for everything" or whatever. To be fair, "fuck it, just use the database" is a totally fine solution in many cases. And yes, I agree Ur/Web is amazing given what it does. The edges are very rough (I don't know if it's the nicest tool by every metric, but definitely several of them). But it's worth considering if you have a mature level of FP experience.