3 ms·
Correct me if I'm wrong but IIRC HM is not applicable with class-based inheritance. How do you (plan to) deal with this? BTW I really like the idea of a typed,
by evacchi 11y ago
Correct me if I'm wrong but IIRC HM is not applicable with class-based inheritance. How do you (plan to) deal with this?
BTW I really like the idea of a typed, compilable Python, keep it up!
- alehander42 11y agoWell yeah, but I wanted to experiment with the language type system(it started from HM, but it can go anywhere). Classes/records are not implemented yet, but I can imagine that we have two cases: <object_with_known_exact_class>.<method> then we'll just convert that to a normal function invocation in c(because we'll be able to detect the exact ancestor which defines the method and the method) <an_instance_of_some_class>.<method> if we only know that an object is an instance of a class, we can wrap the invocation in an inline switch on the type field of the object.(instances would map to C structs).