News for hackers. Stuff that matters.
Re:Why We Use OCaml by sklogic on Monday November 16, 2015 @09:56AM (#10574724)
> var a = 0

This is not a type inference. It is a mere type propagation.

Re:Why We Use OCaml by hacker_9 on Monday November 16, 2015 @10:07AM (#10574797)
Well, no, the term 'type inference' is used to describe var. See here for more:

http://stackoverflow.com/questions/479883/how-good-is-the-c-...

Re:Why We Use OCaml by lpw25 on Monday November 16, 2015 @12:01PM (#10575524)
It is, but it is worth noting that when OCaml or Haskell programmers talk about type inference they are usually referring to global type inference which allows an argument's type to be inferred from its uses. For example:

  let f x = x + x
will be inferred as int -> int.
Re:Why We Use OCaml by sklogic on Monday November 16, 2015 @01:03PM (#10575915)
They can call it any way they fancy, something like "Majestic Royal Type Procession" would have been equally ambitious. But in a context of ML, type inference is a Hindley-Milner inference or an equally powerful equation solving system, and not just a pathetic "assign the RHS type to LHS blindly" as it is in C++ and C#.