Yarn: Static predicate field names are inconsistent

Created on 28 Jul 2020  ·  8Comments  ·  Source: FabricMC/yarn

There isn't a consistent name scheme for static predicate fields. We should decide on one of these formats:

discussion vote

Most helpful comment

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.

All 8 comments

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 Predicates and Functions as if they were methods.

Yes, I also prefer the IS_ suffix.

concern

'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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sollace picture Sollace  ·  12Comments

jamierocks picture jamierocks  ·  13Comments

darkevilmac picture darkevilmac  ·  14Comments

asiekierka picture asiekierka  ·  23Comments

Boundarybreaker picture Boundarybreaker  ·  11Comments