Stream: t-lang/pub-macro-rules

Topic: mental model


view this post on Zulip nikomatsakis (Feb 25 2021 at 10:44):

I was thinking about why I somewhat prefer the story of "pub makes macros work like normal items" to "an attribute makes them behave the old way"

view this post on Zulip nikomatsakis (Feb 25 2021 at 10:44):

I don't know what is really easier for users

view this post on Zulip nikomatsakis (Feb 25 2021 at 10:45):

maybe it'd be nice to review how we would teach etc

view this post on Zulip nikomatsakis (Feb 25 2021 at 10:46):

I guess that "adding pub" feels like improving the existing story -- it's "just" a better version of macro-use and macro-export

view this post on Zulip nikomatsakis (Feb 25 2021 at 10:46):

but macros are still fundamentally different and weird

view this post on Zulip nikomatsakis (Feb 25 2021 at 10:46):

versus a case of "they're almost normal, but you can make them weird to cover some corner cases that are difficult to manage otherwise"

view this post on Zulip rylev (Feb 25 2021 at 12:23):

I think this depends on how much of current patterns can be expressed in the path based system. If the answer is only 0.0001% of current use cases cannot be expressed in a path based world, then it seems fine to have this "escape hatch", but if the figure is way higher (and I suspect it is), then having an escape hatch that almost anyone who makes a non-trvial macro needs to use, is very unfortunate.


Last updated: Jan 26 2022 at 07:32 UTC