Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is pretty rough but as someone who has been programming in Swift since 1.0 I can say it rarely happens in practice. In the early days it happened all the time where the compiler would trip up on random expressions. I can still get it to happen, especially on complex closure type things, but even if those did compile they're confusing enough where they really shouldn't make it past code review anyway. That url example should never either.

I am very curious as to what you're running into where you're seeing wildly slow type checking times.



This was the most recent example: https://pastes.io/slow-type-checkingswift

It could have been the library I was using (YoutubeTranscript) but I wasn't getting any type hints on the result from URLComponents either.

I just updated my app from Swift 5 to 6 and it seems a better.


Same here. I rarely run into this problem. I write mostly SwiftUI too. I will admit there are some built in SwiftUI views that are problematic: tables, outline groups.

Most of the time it’s a syntax error or typo.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: