Replies: 2 comments 3 replies
-
if we use the default import syntax |
Beta Was this translation helpful? Give feedback.
1 reply
-
We may need to avoid the use of |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, in order to access Java classes from JavaScript, users should use the syntax provided by GraalVM - either using:
or:
Although these syntaxes work (the former being the recommended way by GraalVM due to performance reasons), there is another possible way of importing Java classes:
This syntax would probably be more aligned to the way that JS modules are imported. Also, such syntax can possibly be supported on Graal NodeJS and in the NativeScript framework. This would bring the benefit of having the same Java API access on several platforms which is currently not available or at least I haven't found something with a better API.
A really important thing to discuss is if we provide this syntax, what would be the scope name? Would it be
@dirigible-native
or something else? Some other names may be@java
,@polyglot
,@interop
but we should be cautious about possible trademarked names.This discussion is only about the API proposal. If we decide to implement this API, there would be a new discussion about the implementation details as there are several ways to make it all work.
Beta Was this translation helpful? Give feedback.
All reactions