New introspection method

Brian Rice water at tunes.org
Thu Oct 27 15:37:41 PDT 2005


I whipped up a quick introspection method called roleIndices, in vm/ 
interp/map.slate, which returns an Array of the indices that an  
object has a role for. The indices are ordered ascending. So you can  
iterate over the result to do rolesAt: and methodsAt: and so forth.  
The patch is in main and alpha now, although it's not bootstrapped  
in, since I'm still playing with the other recent changes and they're  
more important for the moment.

Maybe I'll make some protocol that takes this and returns an Array of  
collections of methods at each position or something... this doesn't  
seem very simple as an API, so I'll just leave the idea alone for  
now, unless it sounds cool enough to others.

--
-Brian




More information about the Slate mailing list