mathics-core icon indicating copy to clipboard operation
mathics-core copied to clipboard

Expression Refactor Todo list

Open rocky opened this issue 3 years ago • 1 comments

  • [ ] Turn some BaseElement into @attribute get_attributes Same thing for get_elements, get_head, etc?
  • [ ] Move is_inexect out of BaseElement
  • [ ] Move get_float_value() out of BaseElement
  • [ ] Move do_format and format is out of BaseElement

rocky avatar Feb 24 '22 17:02 rocky

My guess is that

  • Expression is the only thing that should have elements.
  • get_attributes has a parameter definitions, so it can not be put as an @attribute. Also, I wonder how far we want to keep methods that depend on Evaluation or Definition objects to be member functions.
  • get_float_value is something that makes sense just for Integer, Rational, MachineReal, and PrecisionReal, in the best case.

mmatera avatar Feb 24 '22 18:02 mmatera