Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start replacing old partial object API #1429

Merged
merged 14 commits into from
Dec 7, 2022
Merged

Start replacing old partial object API #1429

merged 14 commits into from
Dec 7, 2022

Conversation

hannobraun
Copy link
Owner

This pull request starts the gradual process of replacing the old partial object API with the new one. It is a follow-up to #1428, which added the new partial object API. The goal is to eventually address #1249.

This replacements starts at the leaf nodes of the object graph, and I've been working my way up. So far, PartialSurface, PartialGlobalCurve, PartialCurve, PartialGlobalVertex, PartialSurfaceVertex, and PartialVertex have been replaced. This has shown a few things already:

  • The new partial object API can likely take the place of the old one, without making things worse (although some code has gotten more complicated as a result, mostly as a result of the conversion process itself; other code has gotten simpler).
  • There is real promise in the new approach (see Introduce new partial object API #1428 for an explanation). For example, there is some code in PartialCycle::build that just disappeared. No replacement was necessary. It's just no longer needed, due to the inherent properties of the new API. And this wasn't trivial code. It was hard to get right in the first place, and even harder to get into a semi-decent form.

The next steps from here are as follows:

  1. Continue replacing the rest of the old partial object API.
  2. Adjust and extend the new partial object API as necessary.
  3. Start cleaning up the code that uses the new partial object API.

That last point is critical, and something I haven't really started doing so far. If the implementation of the partial object API gets simpler due to all of this, then it will be a win. But unless the new API will also be much easier to use correctly than the old one, it will not be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant