3 ms·
As a fan of ML family languages I have a question for SML lovers. What do you typically build with SML? For context, I’m web programmer and I’m also learning g
by seanstrom 4y ago
As a fan of ML family languages I have a question for SML lovers. What do you typically build with SML?
For context, I’m web programmer and I’m also learning game dev, can I use SML productively?
Or are there other tasks that I could use SML for?
- csb6 4y agoIt is good at parsing/other compiler-related tasks. Basically anything where you are working with tree structures I think can be a good fit. It is also good as a way to learn about functional programming.
- nextos 4y agoSML has an insanely good optimizing compiler, MLton. With some backing SML could be the language of choice for safe and efficient applications.
- sshine 4y agoSML for web and game dev? Why not! There is the Rails-inspired web framework SML on Stilts: — https://github.com/j4cbo/stilts https://github.com/j4cbo/stilts — presumably named after its great ergonomics. And there is the SDL-powered MosGame, specifically for the Moscow ML compiler — https://github.com/Eckankar/MosGame https://github.com/Eckankar/MosGame — it comes with these examples: https://github.com/Eckankar/MosGame/tree/master/examples https://github.com/Eckankar/MosGame/tree/master/examples But really, SML is primarily good for writing compilers.
- chrischen 4y agoReact. https://news.ycombinator.com/item?id=15209814 https://news.ycombinator.com/item?id=15209814 Also the commentor is one of the maintainers of the ReScript compiler, which is essentially being forked from Ocaml.
- jlokier 4y agoI used to work on a hardware compiler written in SML, which compiled a language called Handel to logic circuits for FPGAs. Mostly I worked on fancy optimisation passes, and a fast gate-level simulator. Similar to languages like Haskell which emphasise first-class algebraic datatypes (tagged unions) and pattern-matching in a concise but clear syntax, it's good for writing things that manipulate tree-like and symbol-heavy data structures like program syntax trees and circuit graphs, and quickly trying out new ideas with those.
- porcoda 4y agoI use it for my work in program analysis, code generation, and other languages-research projects. I’ve also used it to a lesser degree for modeling and simulation problems. You would probably be better served by F# or Ocaml for a web-oriented ML stack. SML has less of an ecosystem in that area.
- rixed 4y agoIt is said ML languages are good for compilers. I would say more broadly that they are perfect for anything symbolic.