Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jinterface: make OtpErlangExternalFun transparent #3005

Merged
merged 1 commit into from
Feb 1, 2021
Merged

jinterface: make OtpErlangExternalFun transparent #3005

merged 1 commit into from
Feb 1, 2021

Conversation

ilya-klyuchnikov
Copy link
Contributor

@ilya-klyuchnikov ilya-klyuchnikov commented Jan 26, 2021

Not being able to access the internals of OtpErlangExternalFun is problematic.
The real use case: performing some analysis of Core Erlang (cerl) from inside java/scala - the construct fun module:fun/arity is represented as "itself", and when accessing cerl forms from jinterface - it's represented as OtpErlangExternalFun correspondingly. Unfortunately, - the internals are private, - which makes some forms of Erlang core not analysable through jinterface.

Also, - since all module, function and arity fields are final/immutable - it doesn't make much sense to hide/incapsulate them.

Not being able to access the internals of OtpErlangExternalFun is problematic.
The real use case: performing some analysis of cerl from inside java/scala - the construct `fun module:fun/arity` is represented as "itself", and when accessing cerl forms from jinterface - it's represented as OtpErlangExternalFun correspondingly.  Unfortunately, - the internals are private, - which makes some forms of Erlang core not analysable through jinterface.

Also, - since all `module`, `function` and `arity` fields are final/immutable - it doesn't make much sense to hide/incapsulate them.
ilya-klyuchnikov added a commit to WhatsApp/erlt that referenced this pull request Jan 26, 2021
@rickard-green rickard-green added team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI labels Feb 1, 2021
@garazdawi garazdawi self-assigned this Feb 1, 2021
@garazdawi garazdawi merged commit d35b5cc into erlang:master Feb 1, 2021
@garazdawi
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants