librasteve / raku-Physics-Measure

do calculations on objects with value, units and error
Artistic License 2.0
11 stars 2 forks source link

fix .raku #48

Open librasteve opened 3 years ago

librasteve commented 3 years ago

fro @kjpye The default output with say (i.e. using the non-existent gist method) is also problematic. Perhaps a new gist method which does the same as a (possibly upgraded) Str method would be more suitable.

librasteve commented 3 years ago

I admit that correct .gist and .raku functions were low on my list of priorities … I would probably just have Str call gist and put the body of Str in there … on raku, I have noticed that the default behaviour is to output all the public attributes … and I did not appreciate that the correct behaviour is to have a thing that will recreate the object instance - my bad … this is also an issue that I will fix

librasteve commented 3 years ago

from @kjpye While the normal behaviour of the raku method is to give a string which will re-create the original object, I think there are numerous examples where this is not the case, and so is not really a high priority. On a related point, is there any reason why the dims and dmix attributes need to be public?

librasteve commented 3 years ago

Kevin's comment reminded me that I have been leaving the default raku as is and then using public attributes when I need to view those items during debugging ... so I think I will leave raku as is for now (lazily) until the level of debugging drops a bit ... that change probably goes hand in hand with tightening the attributes to private if they are derived from the original .new parameters