Skip to content

Rethink geometry.require<ManagedQuantityName> #231

Description

@robinchrist

Hey,

I noticed that once you do geometry.require<ManagedQuantityName> it will increment the requireCount. This means that in every method that needs the managed quantity, requireCount will be incremented every time. This somehow feels unclean.

This also means that the managed quantity will always be automatically recalculated, unless you explicitly do geometry.unrequire<ManagedQuantityName>.

I think it would make sense to expose the ensure<ManagedQuantityName> methods. You could do require<ManagedQuantityName> once on Geometry creation, and then just use ensure<ManagedQuantityName> whenever you need the quantity, not incrementing the count every time.

What do you think?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions