Pitch: Reform SetAlgebra

Anecdotal data point: I have a degree in mathematics, and I have never heard the terms “intensional set” and “extensional set” before this thread.

If I were explaining the concept to a friend, I would probably say something like “A set defined by its indicator function” and “A set defined by enumerating its elements”.

As a programmer (and API naming expert :-), I recognize that “enumerating” (or “enumerable”) is not acceptable here because it sounds too much like enum. Similarly, “extensional” sounds too much like extension.

We have precedent for using Countable to distinguish between things that can and cannot be iterated (CountableRange before conditional conformances). So I would lean toward SetAlgebra and CountableSetAlgebra.

9 Likes