-
-
Notifications
You must be signed in to change notification settings - Fork 98
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 clause guards. #886
Labels
Comments
KtorZ
added
parsing
Parser work
typechecking
Types and inference
code gen
Untyped Plutus Core code generation
labels
Mar 20, 2024
KtorZ
changed the title
Remove complex clauses creation (TupleGuard, ClauseGuard, ListGuard) in favor of simplifying when conditions in the Aiken ast
Remove clause guards.
Mar 20, 2024
Merged
github-project-automation
bot
moved this from 🔨 Todo
to ✅ In Next Release
in Project Tracking
Aug 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What is your idea? Provide a use case.
Clause guards have proven not-so-useful (from surveying the Aiken community and analyzing available open-source repositories). So let's remove them from the language.
Why is it a good idea?
They clutter the codebase and make maintenance harder than it needs to be. Less code means less things that can go wrong.
Besides, they can also be a great footgun, as they usually force the use of wildcard patterns in pattern-matches. Why is this bad? Because it makes code more brittle and fragile on updates since the a wildcard will swallow any modifications made on new constructor variants. Yet, we do generally want compiler warnings in such a scenario to ensure that cases are handled properly when needed.
What is the current alternative and why is it not good enough?
More maintenance.
The text was updated successfully, but these errors were encountered: