In short: no.
Macro networks (i.e. macros that generate types instead of methods), but they are not designed and not defined, not to mention implemented ones, and they will not be for 2.10.
In addition, a single macro call can only generate one type. However, since types (in particular, object s) can be nested, this is not a limitation: you can simply create one top level object containing all the classes you need. The difference between this and your code is basically one additional import statement:
package org.smth type O = Generate(params)
They thought about package macros, which can generate entire packages full of classes, but realized that since object is a superset of package , and type macros can generate object that are not needed.
JΓΆrg W Mittag
source share