yarn
yarn copied to clipboard
Static predicate field names are inconsistent
There isn't a consistent name scheme for static predicate fields. We should decide on one of these formats:
- No prefix or suffix:
RIDERS
- 'Is' or 'can' prefix only:
IS_FOOD
- 'Predicate' suffix:
AIR_PREDICATE
- 'Is' or 'can' prefix and 'predicate' suffix:
IS_AIR_PREDICATE
- 'Checker' suffix:
DOOR_BREAK_DIFFICULTY_CHECKER
- 'Is' or 'can' prefix and 'checker' suffix:
IS_DOOR_BREAK_DIFFICULTY_CHECKER
- 'Filter' suffix:
BLOW_UP_FILTER
- 'Is' or 'can' prefix and 'filter' suffix:
IS_BLOW_UP_FILTER
- Just predicate:
PREDICATE
I prefer only FILTER
/CHECKER
suffix without IS
prefix.
I would prefer PREDICATE
suffix without IS
prefix
Imo a predicate is a function, so IS_FOOD
makes the most sense to me, and fits with the style I tend to go with in my personal code.
I also prefer IS_FOOD
or IS_FOOD_PREDICATE
Yes, I also prefer the IS_
suffix. More generally I think we should name Predicate
s and Function
s as if they were methods.
Yes, I also prefer the IS_ suffix.
'Is' or 'can' prefix only: IS_FOOD
I vote for IS_
prefix only. It's just the most concise.
looking back, now i support is prefix. or we can alternatively have a 3rd person present tense verb, like HAS_EFFECT, REQUIRES_SOME_PERMISSION, etc.