In Java you declare the type of a function. class F {public static double f(int x, double y){return x + y;}} The ML compiler infers the type of a function. fun f x y = real(x) + y; The JavaScript interpreter uses runtime typing. function f(x, y){return x + y;}