I’d like to know if there’s any way to return or check the kind (or kind of kind) of an object without “knowing beforehand” in code (to easily check “if Sam Clemens is a man” or “if the big cat understood is a tiger.”)
Say I’ve got a flower kind of thing, a rose kind of flower, and a daffodil kind of flower.
Roses and daffodils both have a value called smell, with roses smelling “like summertime” and daffodils smelling like “Aunt Marguerite.”
There are 20 kinds of rose, and 20 kinds of daffodil, as well as 15 other kinds of flower each with their own 20 kinds.
The kind of flower is needed in a function that would basically be using [kind of the flower] as a cross-reference to a value every person has, “favorite flower”.
Without using laborious “if” statements, or doing the (impossible in my particular, non-example case) “Before/Instead/After smelling a rose/daffodil/tyulip” routine, how can I get the kind of the flower in question/understood?
Thanks to you fine gentlemen for all of your help!