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

Refactor datatypes #338

Closed
wants to merge 6 commits into from
Closed

Conversation

janvrany
Copy link
Collaborator

@janvrany janvrany commented Aug 7, 2024

My stab on refactoring datatypes. Not finished.

Use more descriptive variable names and replace unnecessary `#collect:`
with `#do:` to improve readability.
Instances if datatype component keep constructor, recognizer and accessor
functions.
This allows one to instantiate datatype like

   listSort cons with:1 with: listSort nil new
This allow for tests like:

   someList is: listSort cons
@shingarov
Copy link
Owner

For the time being, MonomorphizedDataDecl appears to serve reasonably well. I am not 100% pleased by this API shape, because the multiple levels of create entail multiple levels of the Hotel, just for datatype induction. Maybe this intermediate level is best replaced by biting the bullet and going from DataDecl to the C API directly, but the current code seems to work fine so let's keep it that now.

@shingarov shingarov closed this Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backburner TODO at some future date
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Idiomatic Smalltalk API for Z3 Datatypes
2 participants