daphne-project / daphne-project/daphne

Private functions in imported DaphneDSL scripts

Open
#672 0 comments 0 reactions 0 assignees View on GitHub
Discussion
Dominant language
C++
Stars
81
Forks
83
PR merge metrics
No merged PRs in 30d

Description

When a DaphneDSL script *A* imports another DaphneDSL script *B*, all UDFs defined in *B* become visible in *A* (with a prefix `B.`). However, some of the functions in *B* may be just internal helper functions that are not meant to be used outside. At some point in time, we should think of a way to disable or discourage the use of such internal functions.

Possible alternatives include:
- disabling the use
- some way to indicate that the UDF in *B* should not be visible in an importing script *A*; could be something like a `private` qualifier or some naming convention (e.g., starting with underscore)
- discouraging the use
- could be some naming convention (e.g., starting with underscore); whenever a user accesses `B._xyz` they know that this is discouraged, but it's still possible

**This isse is *not* urgent at the moment.**

Contributor guide

Open the contributing guide

Research direction

No files, tests, or implementation entry points are named. Start by tracing how imported DaphneDSL script B exposes its UDFs to script A, then decide whether privacy should disable access or only discourage it; done requires an agreed syntax or convention and tests covering imported helper functions.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.