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

export type ets:type/1 #4968

Closed
mheiber opened this issue Jun 15, 2021 · 0 comments · Fixed by #5649
Closed

export type ets:type/1 #4968

mheiber opened this issue Jun 15, 2021 · 0 comments · Fixed by #5649
Assignees
Labels
enhancement team:VM Assigned to OTP team VM types The issue is related to types
Milestone

Comments

@mheiber
Copy link
Contributor

mheiber commented Jun 15, 2021

Is your feature request related to a problem? Please describe.

We have code that abstracts over ets functions, which have ets:type/1 as a parameter type.
Our workaround of having our own type that repeats the definition of ets:type/1 is awkward and not forwards-compatible.

Describe the solution you'd like

Export ets:type/1 or an alias, if a different name is desired

Describe alternatives you've considered

workaround described above

Additional context

In general, when a type is mentioned in exported functions of a module, it makes sense to me to either:

  • expose the type
  • if implementation-hiding is necessary, create an opaque wrapper. Expose the opaque wrapper and use the opaque wrapper in specs for exported functions

related issues:

@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Jun 18, 2021
@KennethL KennethL added this to the OTP-25.0 milestone Jul 2, 2021
@KennethL KennethL added the types The issue is related to types label Nov 22, 2021
@KennethL KennethL assigned garazdawi and unassigned KennethL Jan 25, 2022
garazdawi added a commit to garazdawi/otp that referenced this issue Jan 26, 2022
@garazdawi garazdawi linked a pull request Jan 26, 2022 that will close this issue
garazdawi added a commit to garazdawi/otp that referenced this issue Jan 31, 2022
garazdawi added a commit that referenced this issue Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement team:VM Assigned to OTP team VM types The issue is related to types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants