Post by @hellwolf • Hey
Without generics, this is the sort of none sense you end up in Solidity using the half-baked custom types: ``` type Time is uint32; type Value is
Stats
Actions: 0
Comments: 3
Likes: 1
Mirrors: 0
Quotes: 0
Comments
Custom Types as they are now should just be called aliases or "a.k.a" types. - No operator overload - No implicit wrap / unwrap when is clear what you want to do. eg. function add(FlowRate a, FlowRate b) internal pure returns (FlowRate) { <-- Return type defined return FlowRate.wrap(FlowRate.unwrap(a) + FlowRate.unwrap(b)); ^-- Why? ^--- operands are basic types, imply unwrap itself }