Martin Odersky (lead designer of Scala) also pursued this approach some years ago, not sure if any of this actually went into Scala3. He mentioned this in many talks before, such as https://www.youtube.com/watch?v=WxyyJyB_Ssc (JVMLS 2015 - Compilers are Databases)