Expression Trees


#1

There was a reference a couple years ago to adding expression trees to Kotlin on slide 35 here: http://www.oracle.com/technetwork/java/jvmls2013breslav-2013924.pdf.  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.

Jon


#2

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.


#3

Jon,

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?


#4

Dirk,

This is similar to Groovy AST.  Also refer to Scala Trees (http://docs.scala-lang.org/overviews/reflection/symbols-trees-types.html).  A concrete use of these trees to generate diagrammed assertions can be found in the excellent expecty (https://github.com/pniederw/expecty) that is used by ScalaTest.  A wholly similar mechanism exists in Groovy/Spock.

Jon


#5

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


#6

This is still not on our medium-term roadmap.


#7

What is on the medium term roadmap? :nerd_face:


#8

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