UDAs in Place of alias.thised Wrapper Structs
"Nordlöw" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Sep 11 11:43:57 PDT 2014
Are the pros to using
- UDAs
instead of
- wrapper structs
- alias this
to provide extra semantic information like units of measurement
in terms of compilation speed memory usage and expressivity
I'm asking because I'm planning on converting my
https://github.com/nordlow/justd/blob/master/pprint.d
to UDAs instead of wrapper structs.
On this that comes to my mind is that composability might become
easier right?
See also: https://en.wikipedia.org/wiki/Units_of_measurement
More information about the Digitalmars-d-learn
mailing list