You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
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: