Software Unscripted

Software Unscripted, A weekly podcast of casual conversations about code hosted by Richard Feldman. Hosted on Acast. See acast.com/privacy for more information.

Why Swift’s Type Checker Is So Slow

How a 10 year old design choice for Swift’s type checker still haunts us to this day

By ex-#Apple #Swift developer Jordan Rose [2021]:

“Swift Regret: Type-Based Overloading” (https://belkadan.com/blog/2021/08/Swift-Regret-Type-based-Overloading/).

Part of the 👌🏽 “Swift Regrets” series (https://belkadan.com/blog/2021/09/Swift-Regrets/).

On HN: https://news.ycombinator.com/item?id=28603794

On Lobsters: https://lobste.rs/s/thej9w/swift_regrets

#PLDI #Programming

Swift Regret: Type-based Overloading

When we were first developing Swift, many of the mainstream languages had type-based overloading (C++, Java, C#), and many didn't (C, Python, Objective-C). How did Swift end up with it?

-dealloc
@rmathew the problem with the solution he proposes is that “modern Swift practices” lean hard into the type checker to work. I think a less open-ended type checker would run into trouble against SwiftUI and other newer libraries.