I see many advancements on the Scala 3 (dotty) front, but I still can’t help noticing many macro-related features that I’m directly or indirectly using and there are still no alternatives out there that are even discussed. I’ll layout the features I’m missing, so maybe someone can shed some light:
illTypedfrom shapeless. Used for testing puposes,
illTypedverifies that the specific code fed to it does not compile. It is also possible to compare the compiled error message to verify its contents. Under-the-hood the macro uses
c.typecheck. Is there a viable alternative?
- The refined library enables (using macros) applying compile-time constraints on arguments. While most of its features may be somehow replaceable by meta-programming features of dotty, I have no idea how
Eval(link) can be implemented since it uses
- The sourcecode library provides common source code context for any program via implicit macros. Is there an alternative in dotty? Maybe somehow to reflect context-sensitive TASTY trees to the program?
- The singleton-ops library is the library I’m most dependent on (and help maintain).
- It provides compile-time arithmetic/logic type/value calculations and constraints.
- It provides a mechanism to transfer a type expression to a value expression, falling back to runtime calculations and checks if not all information is available during compile-time (see this thread).
- It provides a mechanism to reroute compile-time
@implicitNotFounderror messages to the proper symbol (using this trick from shapeless).
- It works around the compiler’s eager widening policy.
Currently, I see no way to bridge over these gaps.