Adaptify icon indicating copy to clipboard operation
Adaptify copied to clipboard

Better control for equality

Open haraldsteinlechner opened this issue 3 months ago • 0 comments

We often have this pattern:

// Used to wrap values with reference equality 
// to prevent adaptify from comparing large arrays per value
type RefEqual<'a>(v : 'a) = 
    member x.Value = v

module RefEqual = 
    let fromValue (v : 'a) = RefEqual<_>(v)
    let toValue (v : RefEqual<_>) = v.Value

type EllipticAnnotationResults = 
    {
        sampledPoints : RefEqual<V3d[]>
    }

to prevent expensive model comparisons. Maybe this could be controlled by an attribute similarly to <[NonAdaptive>]?

haraldsteinlechner avatar Oct 08 '25 08:10 haraldsteinlechner