Is it possible for a class itself to define a new class in OOP? Are there any languages (Lisp, etc.) that may allow this to happen? Is this something that can be done in OOP at all, or are there logical flaws in this concept (possibly something along the lines of the base "object" class being unable to redefine a new "object" class?)
For example; If class "B" is a subclass of superclass "A", could you theoretically code a catch block within "B" to create a new sibling class "C" of superclass "A" whenever a specific error is caught? Or would that be completely out of reach for conventional programming languages?
I did some reading regarding Lisp for the first time today, and the concept of editing the actual data structures within the language made me curious about this. Thanks.