Today I learned that c# implemented linq by enhanc...
# power-assert
d
Today I learned that c# implemented linq by enhancing the compiler to pass an AST to any function that takes Expression<T>. Is that a thing that could be done for Kotlin and used to implement power-assert in a more general way?
b
Expression trees as they exist in C# are both a bit heavy-weight for power-assert like functionality and don't contain enough information about the source code to create a diagram. However, it is a design we are aware of and are evaluating for a more general power-assert-like feature. Personally, I was experimenting with something similar, but I'm not sure if we will move forward with the design: https://github.com/bnorm/kotlin-power-assert/pull/88
🙏 1
❤️ 1