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

Function visibility #1203

Open
dark64 opened this issue Aug 16, 2022 · 1 comment
Open

Function visibility #1203

dark64 opened this issue Aug 16, 2022 · 1 comment

Comments

@dark64
Copy link
Member

dark64 commented Aug 16, 2022

Abstract

Adding a function visibility feature would allow users to set a function to be private and local to the defining module.

Motivation

As all functions are exportable and public by default, it is possible to import functions that are not meant to be used directly (for various reasons eg. a function could have assumptions that are unknown to the user). This has happened before with some stdlib functions.

Specification

private def func(...) -> { ... }

We could also use some other term like local because in our case private has a specific meaning, which might cause confusion.

Backwards Compatibility

Depending on the implementation, should be compatible as long as the functions stay public by default.

@ameya-deshmukh
Copy link

@dark64 is this available to take up? Would love to give it a shot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants