logoalt Hacker News

slavapestovyesterday at 3:18 PM2 repliesview on HN

> This has tradeoffs: increased ABI stability at the cost of longer compile times.

Nah. Slow type checking in Swift is primarily caused by the fact that functions and operators can be overloaded on type.

Separately-compiled generics don't introduce any algorithmic complexity and are actually good for compile time, because you don't have to re-type check every template expansion more than once.


Replies

fingerlocksyesterday at 8:18 PM

You’re absolutely right. I realized this later but it was too late to edit the post.

choegeryesterday at 8:28 PM

Separate compilation also enables easy parallelization of type checking.