I'm not familiar with Go. Please correct me, but this reads like object oriented programming i.e. OOP for every kind of data? Coming from C++, this kind of types with classes make sense. But also are a maintenance task with further issues, were often proper variable naming matters. Likely a good balance is the key.
This isn't an OO thing at all. In C, to contrast with Go, a typedef is an alias. You can use objects (general sense) of the type `int` interchangeably with something like `myId` which is created through `typedef int myId`. That is, this is perfectly acceptable C: int x = 10; myId id = x; // no problems In Go the equivalent would be an error because it will not, automatically, convert from one type to another just bec…
This helped me! Especially because you started with typedef from C. Therefore I could relate. Others just downvote and don't explain.