Flunct: Well-typed, fluent APIs in SML
github.com
github.com
Having only learned from a book and with very few and little projects in SML, I have no idea, how they managed to put the HTML syntax in there. Clearly the carets are a start and the dollar signs the end delimiter, but then there are also things like backticks in there, before strings, which remind me of unquote of lisp. But why would one need to unquote strings? Anyway, it does look elegant. Maybe an example of how to compose HTML from multiple parts would also be great to have as an example (-> template engine).
Can anyone shed light on the general approach with ^^ and $$ this is implemented in SML? What kind of language constructs are involved?
EDIT: Also interesting, that they have written their own Test thingy: https://github.com/OriRoth/flunct/blob/main/test/test.sml#L4
There are examples in the paper https://dl.acm.org/doi/10.1145/3586057 (last section I think).
Is there sufficient use of MLTon amd64 backend out there to consider it mature? or Do people prefer the LLVM or C backend instead in general?