2 ms·
The first block defines a macro; the second block is the macro usage. The goal of macros is to deduplicate code; either inside a function or to implement trait
by progval 7y ago
The first block defines a macro; the second block is the macro usage.
The goal of macros is to deduplicate code; either inside a function or to implement traits (eg. the Debug trait, that allows printing a structure/enumeration/... recursively; this would be very boring to implement yourself every time)