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

Remove TypeName and JetName? #28

Open
uncomputable opened this issue Jul 9, 2022 · 2 comments
Open

Remove TypeName and JetName? #28

uncomputable opened this issue Jul 9, 2022 · 2 comments

Comments

@uncomputable
Copy link
Collaborator

We might be able to replace TypeName with lazy const / static Types. This would be useful, since TypeName exists as a hack to generate Types on demand.

Similarly, we might be able to replace JetName and somehow include all the information from JetNode in the enum. This would be useful, because it would guarantee that each jet name refers to exactly one jet. At the moment, we could readily define two jets with the same JetName and this would cause all kinds of havoc.

Originally posted by @apoelstra in #26 (comment)

@uncomputable
Copy link
Collaborator Author

uncomputable commented Nov 21, 2022

JetNode and JetName have been replaced with Jet in #44 . TypeName still exists, but it is hard (impossible?) to represent a finalised type with heap allocations in compile-time code. We might not get around having functions that return a finalised type given some handle.

@apoelstra
Copy link
Collaborator

cc rust-bitcoin/rust-miniscript#484 which is a related issue.

Let's put this one on the back burner until we have some big insight about how to represent closely-related tree structures in Rust :)

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

No branches or pull requests

2 participants