-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Looking across contracts, it appears that most modifiers don't change state: they're generally used for checking preconditions and "condition-orientated" programming. IMO this is good since they are kept simple, and since they don't change state, their order doesn't matter. So instead of the term modifier, as a starting point how about another (additional) keyword for them? The cases where people are changing state in a modifier can remain the same and use modifier, but for new contracts where they don't change state, a term other than modifier seems more fitting as the contract isn't getting modified.
Some suggestions are condition, precondition, pre. Other languages from https://en.wikipedia.org/wiki/Design_by_contract could be consulted for other potential names.