groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <blackd...@gmx.org>
Subject Re: GroovyShell Binding with TypeChecked
Date Thu, 04 Feb 2016 13:29:05 GMT


On 04.02.2016 11:18, Anton Sarov wrote:
[...]
> 2) I try to compile "A" and provide some binding to the
> GroovyShell/GroovyClassLoader/etc. - I would expect that the binding
> "takes the role" of the type checker extension. So that the compiler
> would say "Oh, look, there is a variable whose type I do not know, but I
> have it here in the binding, so I will use this one".
>
> I still do not get why this is not feasible. And that was my question in
> the previous post - is it so, that the compiler ignores the binding.
> Should I think of the binding as something only "runtime-like".

the compiler has no idea about what is in the binding. In other words, 
that link is missing. As of how to provide that link... no idea 
actually. The architecture isolates the compiler quite a lot from all 
kinds of runtime data like a binding normally. Even with extensions, you 
normally do not target actual runtime data, but an abstraction of that 
provided in a way known to the extension.

bye Jochen

Mime
View raw message