On 19.10.2016 12:26, Cédric Champeau wrote:


2016-10-19 10:51 GMT+02:00 Jochen Theodorou <blackd...@gmx.org
<mailto:blackd...@gmx.org>>:



    On 19.10.2016 09:09, Cédric Champeau wrote:

        First of all, great work, Daniel ! I'm confident that making the
        "lambdas" be "closures" in Groovy is enough.


    I think it won't be enough for :: and MethodClosures. Actually,
    Daniel, are those supported in the new Grammar and what are they
    mapped to?


That's correct. I would really love to have _real_ method mapping for ::
in the static compiler. This is obviously not possible for the dynamic
runtime. One option, if we want to make it possible to optimize from the
static compiler is to have a new AST node, MethodPointer, that would be
interpreted as a MethodClosure, and potentially optimized by the static
compiler later as a method pointer.

why should the exsiting node for a MethodClosure not be used for that? The static compiler can still optimize that version, or not?

bye Jochen

Reply via email to