logoalt Hacker News

maleldilyesterday at 11:50 PM2 repliesview on HN

I think that Swift is the exception that proves the rule. The fact that it is notorious for giving up on certain type checks indicates that it isn't a problem for most languages.


Replies

murderfstoday at 12:36 AM

It's the other way around, I think: it's not a problem for most languages because bidirectional type inference with overloading is NP-hard. It'd be nice to have, but it's impossible to implement in a way that's reliably fast, so it's not even considered as an option.

inigyoutoday at 12:36 AM

Got examples for non-Swift programmers?

show 1 reply