The cost of moving from VSCode to neovim has always put me off, but if I could write the config in F# it would tempt me more.
How far is standard ML from F#?
Is there any existing compiler for F# => Lua?
The cost of moving from VSCode to neovim has always put me off, but if I could write the config in F# it would tempt me more.
How far is standard ML from F#?
Is there any existing compiler for F# => Lua?
Standard ML has some nice features though and I think what I mentioned is the only serious shortcoming (except for ecosystem if that's important to you).
Standard ML is also structurally (but strongly) typed, unlike F# and the vast majority of nominally typed languages, which is rare but nice.
type person = { age : int, name : string }
is the same as the type
type animal = { age : int, name = string }
but this hasn't been an issue foe me, and structural typing means you can avoid defining the type at all which is convenient for small records.
For example, a function to increment age has no need for you to define the type.
fun grow { name, age } = { name = name, age = age + 1 }
I think Standard ML helps you understand the origin of some common FP idioms. Like tuples are really just records and SML treats them as such. The empty record {} is the same as the empty tuple (): both are the unit type. And a record like { 1 : "a", 2 : "b" } is exactly the same as the tuple ("a", "b").
There was a time when F# was just an OCaml extension for .NET, but it has developed a lot since.
You may not find a lot of in-depth comparisons between F# and Standard ML, because Standard ML isn't widely mentioned outside of academic research. But you do find comparisons between F# and OCaml, and that may paint a very similar picture:
https://jkone27-3876.medium.com/comparing-ocaml-to-f-f75e4ab...
The most significant differences I can think of are:
1) Standard ML and OCaml have a higher-order module system, and F# has interfaces that you can parameterise over generics.
2) The OCaml ecosystem is functional code on top of functional code, and F# is made to interact with non-functional code on .NET. (As for Standard ML, there isn't much of an ecosystem.)
As an F# newbie, I hit some incompatibility early on with my initial library choices. Not everything works in fable. When I found Safe Stack, that went away.
Then it was great. Hot reload; generated js is passable; I'm doing front end in F# with zero JS and almost no html.