News for hackers. Stuff that matters.
Re:Show HN: A Python with Hindley-Milner-like type annotatio... by alehander42 on Friday June 26, 2015 @11:04AM (#9784929)
Well 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).

There are no comments on this comment yet.