How to simplify the code in constructing struct

You might want to have a look at these packages:

3 Likes