groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graeme Rocher <graeme.roc...@gmail.com>
Subject Re: Proposal: Statically compileable builders
Date Tue, 04 Oct 2016 14:58:55 GMT
Interesting. Also related to this, I wrote a type checking extension
that makes it possible to statically compile StreamingJsonBuilder by
delegating missing methods to invokeMethod:

https://github.com/grails/grails-views/blob/master/core/src/main/groovy/grails/views/compiler/BuilderTypeCheckingExtension.groovy

Cheers

On Tue, Oct 4, 2016 at 4:39 PM, Sergei Egorov <bsideup@gmail.com> wrote:
> Hi Graeme,
>
> FYI a few years ago I created an AST transformation for MapArguments:
> https://github.com/bsideup/GroovyMapArguments/blob/master/src/test/groovy/ru/trylogic/groovy/mapargs/MapArgumentsTest.groovy
>
> Might be helpful :)
>
>
> BR,
> Sergei
>
> On Tue, Oct 4, 2016 at 5:33 PM Graeme Rocher <graeme.rocher@gmail.com>
> wrote:
>>
>> Closely linked to
>>
>> https://issues.apache.org/jira/browse/GROOVY-7956
>>
>> I would like to propose adding the ability to create builders that can
>> be statically compiled by adding a capability similar to Scala's
>> Dynamic:
>>
>> https://issues.apache.org/jira/browse/GROOVY-7957
>>
>> Some considerations:
>>
>> * Behavior of closure delegates?
>> * invokeMethod vs methodMissing
>>
>> Thoughts?
>>
>> Cheers
>>
>> --
>> Graeme Rocher



-- 
Graeme Rocher

Mime
View raw message