# What's the advantage of “value restriction” over its alternatives?

What is the motivation to pick "value restriction" over other candidates?

Examples of alternatives:

1. Enclosing pureness into the function type, for example:

pure_function : x -> x
impure_function : x => x

2. Polymorphism by name (call by name) as in Xavier Leroy, 1993

Xavier Leroy, 1993. Polymorphism by name for references and continuations. In 20th symposium Principles of Programming Languages, pages 220-231. ACM Press, 1993.

• Enclosing pureness into function type only introduces one difference on typing (pure/impure). I believe it is not much more complex than value restriction. In fact value restriction itself does introduce one extra type '_a. Polymorphism by name does not touch the type system at all, and does not need any annotation. It just need a small syntax change as (Leroy, 1993) pointed out. – weakish Aug 6 '17 at 3:38