SuperFola to Programming [email protected]English • 8 months agoType inference was a mistakeborretti.meexternal-linkmessage-square46fedilinkarrow-up168arrow-down111
arrow-up157arrow-down1external-linkType inference was a mistakeborretti.meSuperFola to Programming [email protected]English • 8 months agomessage-square46fedilink
minus-square@[email protected]linkfedilink7•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