-
-
Notifications
You must be signed in to change notification settings - Fork 131
Description
What is your idea? Provide a use case.
I've been refactoring a large set of aiken validators and I have been re-writing some pieces in order to make them more maintainable and cheap.
Although I'm happy w/ the work, and given the code is not final, I wanted to mark some functions as deprecated so that my colleagues wouldn't accidentally start using them instead of the new super cool ones.
Why is it a good idea?
Now sure how much of a good idea it is, as having deprecated code in a smart contract is not a good idea. But it could make sense for unfinished contracts where there is an ongoing, long term, multi people effort, to signal that there are multiple algorithms to solve the same problem, one of which should supersede the other, but for a while new and old code should be kept for some time.
What is the current alternative and why is it not good enough?
Current alternative is to //comment the code which is okay, but it gives no explicit warnings to users.
Afaik Aiken compiler knows how to distinguish dead branches and dead code. Which means by default it could be setup to warning or even better error out if a function is marked deprecated.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status