edited

This comment has been minimized.

Can a whitebox macro compiler plugin exist and work properly? If not, can the hooks be altered so a compiler plugin could provide whitebox macro capability?

You can already do this with the current scala reflect. The whole macro infrastructure is pluggable and can be modified by any compiler plugin. But you need to know your fair amount of magic to be able to pull it off.

The only problem is that if another plugin does it, they're not composable.

This comment has been minimized.

Speaking of which (source location, and making macro usages language features), it would be great if source location would be in the standard library, that way e.g. Future could use them to give better "stack traces"

This comment has been minimized.

I will be prototyping a scalameta based implementation of a code generator, to replace blackbox macro annotations and possibly some whitebox annotations.

The first implementation will be extremely basic, only allowing "extensions" to existing objects/traits/classes. This first implementation will also allow companion objects to be populated. The push to do this is mostly based around deriving typeclasses for AST nodes.

This comment has been minimized.

What exactly would be covered by "deriving"?
Obviously, it would include ADT-based deriving (case classes and sealed hierarchies). But IMHO it's also important give macros ability to materialize implementations of traits, which now requires introspection of trait methods and usually implicit searches for some typeclass instances on parameter types and return types.