On 04.06.2016 13:21, Alan Bateman wrote:
On 04/06/2016 10:55, Jochen Theodorou wrote:
:
But these module API methods are a different beast. How am I ever
supposed to make these work? I am talking about Groovy code callig for
example addReads (I know I am supposed to forget about it, but it is
the first one that I remember right now.. sorry)
I think it might be useful to spend time understanding Nashorn to see
how it works with modules. As it's a module then its dependences are
declared and its internals are encapsulated. At runtime it generates
code into dynamic modules with strong encapsulation and better security
compared to before. It can be simplified a bit and maybe at that point
then it might be useful to publish some documentation or slides that
will help other dynamic languages.
groovy differs slightly in that it (a) compiles also to class files (b)
Groovy is supposed to be used directly and not only through the
scripting API
But of course before there is no documentation on how they did it, I do
not really know if that really makes a difference. For now I only know
that the problem class for Groovy is in between Nashhorn and Javac
bye Jochen