Open kerams opened 2 days ago
We could go further with
[<Struct; IsByRefLike; RequireQualifiedAccess; NoComparison; NoEquality>]
type EnumerationMode<'a> =
| AllAdded of prev: 'a[]
| AllRemoved of prev: 'a[]
| Empty
| ActualDiff of prev: 'a[] * next: 'a[]
This would get rid of the bool in the DU struct at the cost of slightly confusing case field names. (Although struct field merging might require F# 9 and SDK 9)
struct
adds extra overhead. because case elements are not stored in the tupled form but as separate fields in the struct.