3 ms·
Certainly you can define classes at runtime. But I think this is the wrong way to go about logical reasoning. What happens when you want to express that Socrate
by inklesspen 18y ago
Certainly you can define classes at runtime. But I think this is the wrong way to go about logical reasoning. What happens when you want to express that Socrates is a dead Greek philosopher? Do you have DeadMortal (subclass of Mortal with isDead() returning true), GreekMortal, PhilosopherMortal (subclass of UnemployedMortal)?
I think you may get further if you look at a language like Prolog -- work along the lines of predicates, rules, and attributes.