Comment by neonsunset

Comment by neonsunset 9 days ago

1 reply

F# is a statically typed language with gradual typing and full type inference.

Given

let hello value =
    printfn "%A" value
  
hello "world"
hello 2

The binding "hello" has "'a -> unit" signature where 'a is a generic argument it accepts because the "printfn" binding with a given format specifier is generalized the same way and an unconstrained 'T (here 'a) is the most narrow type inferred for "hello".

debugnik 8 days ago

> with gradual typing

Isn't gradual typing widely understood to mean "gradual between static and dynamic", which F# certainly isn't?