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

What I am talking about is more dynamic, although meta-objects could be made more static too.

Particularly, I am not a Musician now but if I learned to play an instrument or performed at a concert I could become a Musician. This could be implemented as

   paulHoule.isA(Musician.class)                                  # false
   paulHoule.as(Musician.class).playsInstruments()                # an empty Set<Instrument>
   paulHoule.as(Musician.class).playsInstruments().add(trumpet)
   paulHoule.isA(Musician.class)                                  # now true
I really did build a very meta object facility that represented objects from this system

https://en.wikipedia.org/wiki/Meta-Object_Facility

in an RDF graph and provided an API in Python that made those objects look mostly Pythonic. Inheritance in MOF is like Java so I didn't need to use any tricks to make dynamic classes (possible in RDF) available.



This is interesting. It seems like a logic language (like Prolog) would work more naturally.




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

Search: