Expression Trees


There was a reference a couple years ago to adding expression trees to Kotlin on slide 35 here:  Is this still on the roadmap?  Some technical limitation that prevented their implementation?

Is there an existing specification out there that I can use to help out?

I’m thinking that expression trees might be a necessary precursor to good diagrammed assertions in Kotlin.



It's definitely not on the roadmap for version 1.0, which is what we're focusing on right now, but it's still something that we would like to look into after 1.0 is out. As far as I know, we haven't done any design for the feature at this time.



could you explain what this is about? I looked at the slides but couldn’t really figure out what Expression Trees really are. Is this similar to Groovy where you can access and modify the AST at a number of different compiler phases?



This is similar to Groovy AST.  Also refer to Scala Trees (  A concrete use of these trees to generate diagrammed assertions can be found in the excellent expecty ( that is used by ScalaTest.  A wholly similar mechanism exists in Groovy/Spock.



Hi, Dmitry! Any updates on this? Some estimates, maybe?


This is still not on our medium-term roadmap.


What is on the medium term roadmap? :nerd_face:


Interesting. It would not only improve testing but also provide superb syntax for Constraint Programming and declarative programming in general