Return type polymorphism in C-like languages

后端 未结 5 570
梦如初夏
梦如初夏 2021-01-17 14:46

Why don\'t we see C-like languages that allow for callables with polymorphism in the return type? I could see how the additional type inference would be a hurdle, but we hav

5条回答
  •  时光取名叫无心
    2021-01-17 15:26

    Because of auto-conversion of types, it is not obvious to know which function to call when return types are close.

提交回复
热议问题