ZoKrates icon indicating copy to clipboard operation
ZoKrates copied to clipboard

Function visibility

Open dark64 opened this issue 2 years ago • 1 comments

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 avatar Aug 16 '22 10:08 dark64

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

ameya-deshmukh avatar Apr 30 '23 20:04 ameya-deshmukh