News for hackers. Stuff that matters.
Re:Go Home Swift Compiler, You’re Drunk by mikeash on Tuesday April 26, 2016 @08:11PM (#11576890)
Not at all. Most code doesn't suffer from this problem. It's a pathological case.
Re:Go Home Swift Compiler, You’re Drunk by catnaroek on Wednesday April 27, 2016 @01:03AM (#11577933)
The code that triggered this long type inference loop seems pretty normal. It's not like Damas-Milner's pathological case (deeply nested instantiations of type schemas), which is genuinely uncommon.
Re:Go Home Swift Compiler, You’re Drunk by mikeash on Wednesday April 27, 2016 @09:34AM (#11580261)
Nested collection literals aren't very common. It certainly doesn't justify requiring something like `let x = f()` to have a type annotation.