You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way Swift macros are syntactically defined and their appearance is quite similar to property wrappers and result builders, especially in the case of attached macros. Property wrappers and result builders can be qualified with module names as namespaces to avoid naming collisions.
On the other hand, macros have no way to avoid name collisions when the same macro name exists in different modules, resulting in an "ambiguous use" error. I believe that macros should also be able to use module names to represent their fully qualified names, just like property wrappers and result builders.
For example, property wrappers can be qualified by the module name as follows:
Description
The way Swift macros are syntactically defined and their appearance is quite similar to property wrappers and result builders, especially in the case of attached macros. Property wrappers and result builders can be qualified with module names as namespaces to avoid naming collisions.
On the other hand, macros have no way to avoid name collisions when the same macro name exists in different modules, resulting in an "ambiguous use" error. I believe that macros should also be able to use module names to represent their fully qualified names, just like property wrappers and result builders.
For example, property wrappers can be qualified by the module name as follows:
Result builders also can be qualified by the module name as follows.
Macros should be able to be qualified by the module name as well.
The text was updated successfully, but these errors were encountered: