idupree/Lasercake — comment on commit 862c1d44fe50653186f7a5a849c9fcfcc7898b5e
File:  line 0
By idupree:

After I went to bed I thought of tile_contents_equivalent_for_interiorness or similar (specify that we're checking whether the contents are equivalent, not whether the interiorness bits are equivalent. I realized I'd deleted the "_type" in the previous name that actually meant something related to tile contents). "checking" should not be in the name! It's not about checking! It's about a property that holds even when you're *not* checking!

The _representative function would have been hidden from other code if that was easy, and you're right about the most formally correct way of making a C++ class, it is just not worth it for a concept that occupies one line of code that is used in one place right next door. (Unless we need similar sorts of equivalence classes other places too...or...hmm... Making it a C++-class would be worth it iff we store its value in a variable anywhere, I think.). _equivalent is still an equivalence relation (I almost called it interiorness_equivalence_relation but then realized functions should typically be named for what they do, not what they are).

thoughts (possibly supply multiple of these) :
tiles_form_a_boundary_between_interiors() //the name works whether or not equivalence is transitive, which it would document in a comment that would also say that it's symmetric and ir/reflexive. Every use of interiorness_equivalent() is negated (they all used != before my change). so it seems plausible to supply a function with this sense? (There must be a nice phrase for the opposite of "form a boundary" if we wanted, but I haven't thought of it yet.)

tile_contents_equivalent_for_interiorness() //if it is transitive. OR. If it's non-transitive but some contents values are completely equivalent anyway

tile_contents_could_possibly_be_in_the_same_interior() //if it's non-transitive. Could be useful, or not.