The type system in Scala is Turing complete. Proof? Example? Benefits?

后端 未结 2 816
别那么骄傲
别那么骄傲 2020-12-01 04:32

There are claims that Scala\'s type system is Turing complete. My questions are:

  1. Is there a formal proof for this?

  2. How would a simple comput

2条回答
  •  情深已故
    2020-12-01 04:39

    My blog post on encoding the SKI calculus in the Scala type system shows Turing completeness.

    For some simple type level computations there are also some examples on how to encode the natural numbers and addition/multiplication.

    Finally there is a great series of articles on type level programming over on Apocalisp's blog.

提交回复
热议问题