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

Minor things noticed in looking over the code #1087

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

rocky
Copy link
Member

@rocky rocky commented Sep 19, 2024

Here are some minor things noticed in looking over this module.

There is something that greatly bothers me that isn't fixed though.

In this module, the base class is named Pattern. Elsewhere, base classes are prefaced with Base. For example, BaseElement, BaseRule, or BaseForm.

And then, because of this, the builtin function Pattern[] in module mathics.builtin.pattern uses the class name Pattern_.

To me, all of this feels like a gratuitous complication (even though I imagine this was due to sloppiness).

@rocky rocky requested a review from mmatera September 19, 2024 02:35
@mmatera
Copy link
Contributor

mmatera commented Sep 19, 2024

Here are some minor things noticed in looking over this module.

There is something that greatly bothers me that isn't fixed though.

In this module, the base class is named Pattern. Elsewhere, base classes are prefaced with Base. For example, BaseElement, BaseRule, or BaseForm.

And then, because of this, the builtin function Pattern[] in module mathics.builtin.pattern uses the class name Pattern_.

To me, all of this feels like a gratuitous complication (even though I imagine this was due to sloppiness).

I fully agree. If you are up for it, please include the changes here.

@rocky
Copy link
Member Author

rocky commented Sep 19, 2024

I fully agree. If you are up for it, please include the changes here.

Done. I suspect down the line we will want to make even more changes to the code touched here, but this is just another step in the right direction of making the code more easily understandable.

@rocky rocky merged commit e0e8872 into tidyup_core_pattern Sep 19, 2024
8 checks passed
@rocky rocky deleted the tidyup_core_pattern-rocky branch September 19, 2024 13:34
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.

2 participants