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

What's possibly so cumbersome about defining return types?

It does seem a little embarrassing that the annotations don't even support circular references.



Circular references like that are called "recursive types" in formal type theory. They are one of those big issues that academics like to write papers about.

Even if you just want to write a practical interpreter, and choose to gloss over the issues, they will still come back in some disguised form and either by requiring some sort of implementation kludge, or just by creating weird edge cases.


And how is that an issue for type checking, would you elaborate?


Author of the subj didn’t even bother to Google that issue, which is solved by the way.




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

Search: