JDK9 features

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Thu May 12 04:36:37 UTC 2016


Hi,

Thanks for your comments!

Making comments on forthcoming JDK releases is hard :) Whatever I'm
saying now, may not happen - the usual disclaimer applies.

No, we expect that only a subset of ES6 features will be implemented for
Java 9.

1. On loading definitions without changing global namespace: you meant
current global namespace? loadWithNewGlobal creates a new global and
loads definitions into that.

Would that be useful for you? or anything else? Which hack you're
referring to? Please file an enhancement with your requirements.

2. on JSON: Again, will you please provide a simple test case and/or
file an enhancement with requirements?

Thanks,
-Sundar

On 5/12/2016 12:56 AM, Eric Pederson wrote:
> I've been noticing the Java 9 ES6 features tweeted by @sundararajan_a
> <https://twitter.com/sundararajan_a>.  Looks awesome!  Will there be full
> ES6 support in Java 9?
>
> There are a couple of other things we would love to see in the updated
> Nashorn:
>
> 1. We've been using the same hack that you recommended to Tim Fox for
> loading functions without changing the global namespace - the Avatar/js
> CommonJS/require hack.  It would be great if this was supported natively in
> Nashorn via a new loadXXX().
>
> 2. It would be also be great to have the inverse of asJSONCompatible for a)
> JSObjects returned by Java code and b) objects from other scopes.  Our name
> for ScriptObjectMirrors in Javascript code is "mutant objects": they look
> like regular JS objects but they are missing most of their DNA, and you
> don't realize until you get an exception or silent failure somewhere down
> the call chain where it's difficult to figure out why :)
>
> Anyway, the upcoming stuff looks great!
>
> Thanks,
>
> -- Eric



More information about the nashorn-dev mailing list