Add note on sparse vs contiguous

This commit is contained in:
FourteenBrush
2025-07-11 17:17:30 +02:00
parent 56c221e211
commit cb05271157

View File

@@ -213,7 +213,8 @@ type_is_subtype_of :: proc($T, $U: typeid) -> bool ---
type_field_index_of :: proc($T: typeid, $name: string) -> uintptr ---
// Contiguous as in having a set of constants, when sorted, the difference between consecutive constants is only 0 or 1
// "Contiguous" means that the set of enum constants, when sorted, have a difference of either 0 or 1 between consecutive values.
// This is the exact opposite of "sparse".
type_enum_is_contiguous :: proc($T: typeid) -> bool where type_is_enum(T) ---
type_equal_proc :: proc($T: typeid) -> (equal: proc "contextless" (rawptr, rawptr) -> bool) where type_is_comparable(T) ---