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

I'm going to have to disagree here.

The return type is part of the contract for what a method does. Changing it is just as dangerous as changing the type on a method parameter.

I agree that using type inference locally is a boon to productivity. I disagree that it's a negative for a method return parameter.

Keeping it fixed prevents a future refactor from breaking the method expectations and contracts down the line.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: