Skip to content

Comments

Minor tweaks...#1162

Closed
rocky wants to merge 1 commit intomakeboxesoverhaultfrom
makeboxesoverhaul-rocky
Closed

Minor tweaks...#1162
rocky wants to merge 1 commit intomakeboxesoverhaultfrom
makeboxesoverhaul-rocky

Conversation

@rocky
Copy link
Member

@rocky rocky commented Feb 21, 2021

Back to you @mmatera for some small changes.

to comments and names.
@rocky rocky requested a review from mmatera February 21, 2021 09:26
Copy link
Contributor

@mmatera mmatera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rocky I took note of your comments and I have incorporated some of them to #1140. If you agree, we can close this PR.

What remains open, and I think that would deserve some extra discussion, is the role of InstanceableBuiltin / CustomizableBuiltin and AtomBuiltin in the Mathics' class hierarchy. Both classes refer to objects that both define an interface and also hold "live data", so represent both an Expression and a Python object that contain non-trivial data structures associated with that expression, that we shouldn't duplicate.



class InstancableBuiltin(Builtin):
class CustomizableBuiltin(Builtin):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I wouldn't change this name: InstancableBuiltin (InstanceableBuiltin) is a class representing Builtin objects that make sense to instantiate in runtime, storing different data on each instance. For example, PatternObject are InstanceableBuiltin.
Builtinobjects, on the other hand, are just instantiated once when a module is loaded, and all the data they store belongs to the class. Actually, if you do not specify the opposite, each time you instantiate a Builtin, what you actually create is an Expression.
I think that this way to work is not very intuitive, and probably could be implemented in a simpler way, but this would require a complete re-factory of all the kernel.

@rocky
Copy link
Member Author

rocky commented Mar 4, 2021 via email

@rocky rocky closed this Mar 6, 2021
@mmatera mmatera deleted the makeboxesoverhaul-rocky branch March 14, 2021 18:29
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