3 ms·
None of these enable ordinary D code to not be ordinary D code, which is the crucial difference. Similarly, operator overloading is deliberately constructed in
by WalterBright 8y ago
None of these enable ordinary D code to not be ordinary D code, which is the crucial difference.
Similarly, operator overloading is deliberately constructed in such a way as to allow new arithmetic types to be smoothly designed, but to make it clumsy to do things like C++ IOstreams.
- FeepingCreature 8y agoThey do enable expanding the definition of what is ordinary D code. With UDAs, you can write declarative data structures that are more UDA semantics than D semantics. Macros do the same thing, if with more range.