Extend language with `prot fn` keyword for marking top-level entry points (protocols)
- Dominant language
- Rust
- Stars
- 15
- Forks
- 0
- Avg merge
- 6h 20m
- Merged PRs (30d)
- 15
Description
(Creating an issue for this discussion just so we don't forget)
Paraphrasing our [Slack discussion on 11/3](https://cucapra.slack.com/archives/C0814JN4VMH/p1762186575860769):
Adrian suggested adding an additional keyword (`prot`) to the DSL for marking the `fn` definitions that are top-level entry points, which make them protocols? That is, the user would write `prot fn foo` to declare a top-level protocol `foo`.
Nikil raised the point that in the future, if we want to allow protocols to call other protocols as a method of composition, we may want to define some "sub-protocols" that are correct when used within the context of the larger parent protocol but incorrect to run as an independent transaction on their own. To support this kind of composition, adding the `prot` keyword to the language allows us to (syntactically) distinguish sub-protocols that can only be used in composition with others, versus "true" protocols (those the user can call in a `.tx` file).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.