Type inference

November 4, 2020 ยท View on GitHub

The Concept

Automatically inferring the type of an expression.

What to cover

  • What is type inference? Explain what type inference is.
  • How to use type inference How to use type inference in your language.
  • What restrictions are there? What restrictions are there?

Exercises

Lasagna cooking

This exercise deals with cooking a lasagna dish in the oven. The reference implementation (F#) teaches:

  • What type inference is.
  • The limitations of type inference.
  • How type inference can be used when defining variables.

Implementations

TrackExerciseChanges
C#lucians-luscious-lasagnaNone
F#lucians-luscious-lasagnaNone
ScalabasicsNone