ZoKrates
ZoKrates copied to clipboard
Function visibility
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.
@dark64 is this available to take up? Would love to give it a shot!