Re:A Failed Experiment with Python Type Annotations
by adrianratnapala on Tuesday June 11, 2019 @11:15PM
(#20161457)
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.
Re:A Failed Experiment with Python Type Annotations
by heavenlyblue on Wednesday June 12, 2019 @12:12PM
(#20166183)
And how is that an issue for type checking, would you elaborate?
Re:A Failed Experiment with Python Type Annotations
by heavenlyblue on Wednesday June 12, 2019 @12:10PM
(#20166164)
Author of the subj didn’t even bother to Google that issue, which is solved by the way.
It does seem a little embarrassing that the annotations don't even support circular references.