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

Reply via email to