Skip to content

Comment on Dart Macros and Focusparent

Comments

Macros are capable of much the same thing as reflection, but without the reflection part. Anything you would use an annotation/decorator/attribute/etc for, can be done as a macro to eliminate the runtime performance impact and the vector for action-at-a-distance. In addition to removing internal copy-pasting/templating when you just can't quite replace it with an interface instead.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.