SE-0389: Attached Macros

This came up in the first review of SE-0283:

This hasn't really been a problem in practice with type-based custom attributes because of the capitalization in the naming convention for nominal types. Perhaps we should recommend the same naming convention for attached macros.

This is an interesting idea, but I think the attributed model is the right way to think about macro roles. If anything, I think macro declarations could express their overloads as "member" declarations, e.g.:

@attached(member, ...)
macro SomeMacro {
  // each 'init' declaration describes the parameters that can be used in the macro attribute

  init(_: Int) = #externalMacro(/*some external macro*/)

  init(_ : Double) = #externalMacro(/*some other external macro*/)
}

This model would allow the compiler to resolve macros to a macro declaration without performing overload resolution, but this is orthogonal to your comments about macro roles.

This does not cover overloaded, prefixed and suffixed. I don't think we can eliminate named.