3 ms·
> What I'm wondering is why we can't use a similar system as SML to infer the types. We can and do! Use SML! People just don't find out about the good type s
by mrkeen 3y ago
> What I'm wondering is why we can't use a similar system as SML to infer the types.
We can and do! Use SML!
People just don't find out about the good type systems because the market is crowded out by mainstream shit.
And people write pieces about how good this shit is: "I was going to add an Int to a String but the compiler stopped me! Less [sic] bugs!". With arguments like that, why would you switch camps?
Or sometimes you get fed shit and get told it's inference: "I can replace the first word on the line with 'var'!".
So what are the downsides?
Inference doesn't play well with inheritance or mutability.
If you read Effective Java and see the points about avoiding mutation and inheritance, then these downsides may very well seem like upsides to you.
Why did you stop coding in SML?
- hangonhn 3y agoSML has never been used in any of the jobs I've had. I definitely have a very functional programming bend to my preferences. The closest I've come to doing something like SML for work is to use Clojure.