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

Support option types #157

Closed
roconnor-blockstream opened this issue Jul 11, 2023 · 3 comments · Fixed by #158
Closed

Support option types #157

roconnor-blockstream opened this issue Jul 11, 2023 · 3 comments · Fixed by #158

Comments

@roconnor-blockstream
Copy link

I use 'S A' in the tech-report for the option type. The idea is that 'S' is shorthand for 'successor', which in turn means 'plus one'. However feel free to use whatever syntax you are most comfortable with. The above is a little bit obtuse.

@uncomputable
Copy link
Collaborator

Good idea. This would enable us to better handle the source and target types of the sha256 jets, which are pretty wild. There are a lot of other use cases.

@apoelstra
Copy link
Collaborator

My thoughts are:

  • Option[type] which I think would be easier to read
  • type? which is easier to write and continues in the "type constructors are one character" pattern we've had so far

@roconnor-blockstream
Copy link
Author

roconnor-blockstream commented Jul 12, 2023

? is so good (it means + 1 in regexp, or + ε, where ε is basically regexp's notion of 1 (it is a unit of multiplication, which is concatenation in regexps)), I feel like I should change my tech report to this symbol.

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

Successfully merging a pull request may close this issue.

3 participants