It depends upon the system your are writing and how big is "large-scale". Why? I would argue that defining system ids and other value based types as structs would not be a waste of time or taking it too far. It would help define the limitations and bounds for the type.
There have been too many instances of String
being re-purposed for various nefarious programming constructs:
- multiple value chaining where and
id
has data added to it because it is easy and convenient
- unintended invariant usage such as knowing the
-
char is invalid so using that for another value
Practices like this will creep into your system because the original authors never specified or enforced, via type constructs, the limitations. Business priorities (we go live tomorrow and cannot change the database now!) or even lazy development practices take advantage of you lack of specificity.
Define your value types as value types, including using structs, but make their usage clear and enforced by the code.