25 Apr
2022
25 Apr
'22
6:20 p.m.
On 4/25/2022 9:13 PM, Mehdi2277 wrote:
We could have forward part include all of method signatures/attributes which is what a type checker needs. In theory we could do,
forward class Foo: x: int y: list[str]
def __init__(self, ...)
def process(self, data: list[float]) -> float: ...
and then later do continue class. If we're willing to write a full header equivalent of c++ then I think static typing side will work. It'll be a lot more verbose then normal that I'd probably pick other solutions, but I it should make it tractable for a type checker.
How would this address the use case presented in the original post? class A: value: B class B: value: A Eric