I have a function that takes object instances and reduces them down to an abstract/generic format. Like this:
class Dog { id=0, awesome=1 }
=> [id:0, type:'dog'] //abstract, generic version
class Cat { id=1, awesome=0 }
=> [id:1, type:'cat']
class Narwhal { id=42, epic=1 }
=> [id:42, type:'narwhal']
I call this an abstractor. "Generalization by reducing the information content."
What is the opposite of an "abstactor"? I have a function that does the opposite of abstraction (by using the abstracted version's id
and type
to pull the other fields, like awesome
and epic
, from a database). For the life of me, I can't figure out what to name it.
My closest guesses are "instantiator" and "composer", but neither of these seem quite right.