> I quite like this approach, where it's not `cl-types-of', but each type > that bears responsibility for its implementation. Usually, I like to solve a problem centrally so it's done once and for all, but here the problem is that breaking recursion is tricky business which may need to be done in different ways in different cases, and on top of that it's a fairly rare need, so I think in this case dumping the responsibility onto those rare users of circularity in types is the right tradeoff. > So, if I understand correctly, your recommendation is to not try to solve > recursion (or other) problems in `cl-types-of' at all, but rather at the > level of each type's definition, and to let ill-defined types possibly > cause errors? Basically, yes. > The only point that still bothers me is not protecting `cl-types-of' from > errors due to ill-defined types. This is particularly true because this > can impact the entire Emacs session if certain methods are prevented from > working, such as those involved in the display process (I use such methods > based on `cl-deftype' for example, in my own alternative implementation of > icons and tab-line). Fair enough. I pushed your new code to the `scratch/cl-types` branch in `emacs.git`. I haven't integrated it into the other CL-Lib files yet. See patch below for comments on your code. Stefan