Eduardo Cavazos | 29 Aug 22:11

Introspective incantations to help with removing old accessors

Hello,

One of our current subprojects is to remove all the old style accessors. Doug 
asked Slava for a way to get a list of the accessors in the system and Slava 
got us started in the right direction. What I ended up with is this:

USE: obj.print ! for print-table

classes
  [ tuple-class?                        ] filter
  [ "slots" word-prop                   ] map concat
  [ [ reader>> ] [ writer>> ] bi 2array ] map concat
  [ [ vocabulary>> ] [ ] bi 2array      ] map
  sort-keys
print-table

That prints out a nice table sorted by vocabulary name.

I'm working on the old accessors in the 'ui' vocabularies in particular so to 
get the table for just those vocabs I did:

classes
  [ tuple-class?                        ] filter
  [ "slots" word-prop                   ] map concat
  [ [ reader>> ] [ writer>> ] bi 2array ] map concat
  [ [ vocabulary>> ] [ ] bi 2array      ] map
  [ first "ui" head?                    ] filter
  sort-keys
print-table

(Continue reading)


Gmane