Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: