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

Counter-point: consider the case where the body of the function is only `return value`.


Isn't that an argument that the function implementation might break, not that callers might?

Assuming implicit conversion for union types, you could either widen argument or narrow return without changing that implementation, but not both. A different implementation may not be able to handle either modification, though.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: