3 ms·
Java enums are essentially an in-built singleton pattern where only the given entries can exist. They are not necessarily analogous with sum types, even though
by kaba0 5y ago
Java enums are essentially an in-built singleton pattern where only the given entries can exist. They are not necessarily analogous with sum types, even though rust sort of washes the two together.