orwell famously said that freedom is the freedom to say `2 + 2 == 4`. on the swift project, our crack type-checker team is working hard to give our developers that freedom, in reasonable time https://forums.swift.org/t/roadmap-for-improving-the-type-checker/82952
Roadmap for improving the type checker

Roadmap for improving the type checker In the past, we've released various "manifestos" and "roadmaps" to discuss planned improvements to the language. This post is also a roadmap of sorts, but instead, the focus is on the implementation rather than user-visible language changes (however, I will briefly mention a few potential language changes at the very end). Specifically, I'm going to talk about some work we are doing to improve expression type checking in the Swift compiler. This includes c...

Swift Forums
@joe I came to do some low-effort trolling by suggesting CDCL SAT solving and BDDs, but @slava mentioned them at the very end. I think BDDs probably have a lower evaluation cost than CDCL, because they either compress your boolean functions or not, whereas CDCL requires restructuring your solver loop entirely.
@zwarich @joe lowering everything to Boolean formulas is appealing but we’d have to do something clever because we sometimes generate new constraints in the middle of solving
@slava @zwarich @joe have we considered just adding a tool to automatically write more type annotations into source code for when you're done writing code and want to stop wasting time and power doing inference?
@joe Jokes aside, it is great to see swift team developing things so openly, and being so explicit about their goals and methods. Thanks for this.

@jonmsterling @joe My father died the day Swift announced pattern matching as a feature. I was looking forward to phoning him that night to tell him he had won. Instead, my brother phoned me to tell me my father was dead.

But he did win. For which I'm delighted. More! More!

@joe @siracusa They should care a bit more about type checker in SwiftUI tho… 🙃
@joe this is great to hear, even if I don’t fully understand it. I’m curious though why Kotlin doesn’t seem to have this issue but seems quite similar to Swift?
@Jon889 @joe one cause of much trouble in Swift is that operators are largely treated as free functions, which means you have lots of overloads to resolve, whereas in Kotlin they seem to be bound as a method of the LHS. From reading the description of the type inference there it also sounds like it might commit more and have less backtracking? Unsure.
@Jon889 @joe Another cause of trouble in Swift that’s mentioned in the post is that the number 1 could be either an Int or a Double so you have to check a lot more overloads if there are multiple numeric literals in an expression, whereas Kotlin requires you to have a decimal point in floating point types.