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

Add new builder API #866

Merged
merged 10 commits into from
Jul 22, 2022
Merged

Add new builder API #866

merged 10 commits into from
Jul 22, 2022

Conversation

hannobraun
Copy link
Owner

This is a new builder API to replace the previous one, which had been removed. This new builder API provides two immediate advantages:

  • It adds back the convenience that was lost when the remnants of the previous builder API were removed.
  • It lightens the object modules, by moving anything non-essential out of them again.

The main feature, however, are the new wrapper structs that this new style of API enables, represented here by FacePolygon. This aspect isn't fully formed yet, but eventually, there will be more such wrapper objects, and they will provide services beyond just building the object. For example, I'm currently working on a Cube wrapper struct, that provides methods like bottom_face, top_face, etc.

This is going to mesh well with the object update API I'm currently working on (no issue open yet; still exploring the design space). With this update API and the new builder API, you will be able to create a cube, select one of its faces, and make modifications there. This is going to be highly useful for test code.

I think it makes sense to have all methods for building an object come
first, the messages for accessing the built object after.
This is only a first step towards establishing a new builder API.
This new `FacePolygon` struct isn't fully formed yet. It will be used to
provide more capabilities to the builder API.
@hannobraun hannobraun enabled auto-merge July 22, 2022 14:15
@hannobraun hannobraun merged commit 8cb928b into main Jul 22, 2022
@hannobraun hannobraun deleted the builder branch July 22, 2022 14:17
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