That sounds like a great improvement.
However, I am struggling with introducing prefixed
and suffixed
macro at the same time.
There is an example where I was trying to do it by using two sequential macro: Peer macros on a protocol - #11 by blindspotbounty but that sounds like a hack.
Furthermore, it doesn't work due to compiler bug: Sequential peer macro (PeerMacro) is not taken in attention for compilation but conflicts with re-declarations (swift 5.9) · Issue #67506 · apple/swift · GitHub
Therefore, I was looking for some solution that is in place or probably in plans. I would expect something like names: prefixed(Prefix) & suffixed(Suffix)
or names: prefixed(Prefix), suffixed(Suffix)
that would include name: PrefixSomeNameSuffix
.
Could you suggest if it is currently possible in some way, please?
UPD: other thing that used to be possible was related to arbitrary conformance: generating protocol by struct/class definition and make a conforming extension for it. Example is here: [Accepted] SE-0402: Generalize `conformance` macros as `extension` macros - #5 by blindspotbounty
Though it might be not very often cases for macro, they still might be valid.