I ran into a similar problem when working with sets. I could define sets using templates, but I couldn't define sets of sets without the compiler complaining about recursive definitions. For example: class Set (T) { T[] elems; ... } but how would I define a set of sets?. Set! (Set) family = ... does not work.