Awesome idea!
Maybe it would be helpful to you.
The biggest problem I had was generics support. For example, what would happen in case of:
```python
from numbers import Real, Integral
@dispatch()
def __lt__(lhs: list[Real], rhs: list[Real]) -> bool: ...
```
I had troubles with it. And my version does not support generics with type arguments (because that's how isinstance works which we rely on during runtime).
The second problem is protocols (generic protocols are the hardest). What should happen in a case of:
```python
@dispatch()
def __lt__(lhs: int, rhs: int) -> bool: ...
@dispatch()
def __lt__(lhs: SupportsInt, rhs: SupportsInt) -> bool: ...
```
Should it be dependent on the order of declarations?
Or should we check the most specific types first? How to determine the most specific types?
This is really a deep topic!
Best,
Nikita Sobolev