SuperFola@programming.dev to Programming Languages@programming.devEnglish · 7 months agoType inference was a mistakeborretti.meexternal-linkmessage-square46fedilinkarrow-up169arrow-down111
arrow-up158arrow-down1external-linkType inference was a mistakeborretti.meSuperFola@programming.dev to Programming Languages@programming.devEnglish · 7 months agomessage-square46fedilink
minus-squareKindaABigDyl@programming.devlinkfedilinkarrow-up7·7 months ago In Rust and Haskell you have to at least annotate the parameter types and return type of functions. In OCaml type inference is a lot more powerful: you don’t have to annotate function signatures Actually, Haskell and OCaml have this in common. Only Rust requires parameter types of the three. I could do add2 a b = a + b main = do putStrLn $ "5 + 3 = " ++ (show $ add2 5 3) And that would work
Actually, Haskell and OCaml have this in common. Only Rust requires parameter types of the three.
I could do
And that would work