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

Update bindings to use constructors #481

Open
saulshanabrook opened this issue Dec 5, 2024 · 0 comments
Open

Update bindings to use constructors #481

saulshanabrook opened this issue Dec 5, 2024 · 0 comments

Comments

@saulshanabrook
Copy link
Member

Once #461 is merged, we need to update what is emitted in egglog.

In terms of the disallowing lookups in actions, this will just be a breaking change.

For the other part, renaming functions to constructors, this can be done automatically. It's a bit tragic because we use @function and @method in the Python codebase, and now @function would likely emit a constructor not a function, so it's a bit confusing.

But basically, we can emit a constructor whenever the result is an eqsort (user defined) and a function if the result is a primitive.

However, we can also have an eqsort returning function, which only allows it to be set once and not unioned. We could add this as a kwarg constructor=False to force this even if you return an eqsort.

However, things are still in flux, so this may change.

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

No branches or pull requests

1 participant