> For a toy example like this, this is reasonable advice. I know you were not after advice, but wanted to suggest a design change to Julia. I thought Yichao Yu gave a nice response to that, and I am looking forward to see the developments he promises. I just thought I would point out an ideomatic julian way of acheiving what it it is you want. Generally, of course, I can do no better than proposing a suggestion to solving the example you give. If your use case is different or more encompassing, you could try to describe it and I am sure the mailing list can give you some nice advice.
I don't see the issue with typos and copy-pasting. In your example, the normal approach would be to define a type CatData with all the fields and variables you feel a Cat needs, and then design all cats to contain this object.
