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

That isn't the problem. This is the issue:

   let x = str.parse()?;

   someFunc(x);

The function called here is dependent on what `someFunc` will accept. That means that I can change what values will be accepted here by changing a completely different piece of code.


Only if you think of other code in the same function as 'a completely different piece of code'.

With global type inference, the whole program is inferred for example.




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

Search: