A notable case study for anyone designing a type system for their own language.
Swift’s compiler can infer ambiguous expressions like enum case names based on their type, inferred from surrounding context. This makes the syntax less verbose, but at a cost; some seemingly benign expressions take several seconds to type-check, after which the compiler ultimately gives up with an unhelpful error message: “the compiler is unable to type-check this expression in reasonable time”.
The linked post goes into more detail.
You must log in or register to comment.