Martin Baker wrote: > > Waldek, > > While you are looking at scene.spad.pamphlet perhaps you may like to > look at some tidyups and additions to the code and additions to > (inline and literate) documentation that I have put here: > > https://github.com/martinbaker/fricas/blob/master/src/algebra/scene.spad.pamphlet > > If you agree with these changes they would need to be consolidated > with your changes (for instance I think you have removed the _ before > a ! in a name and stuff like that). Would you do the consolidation or > would you like me to attempt it?
I think that it is better if you do this. Namely, I did 3 quite mechanical changes: - remove trailing whitspace (trailing whitspace confuses programs and people so I trying to get rid of it) - remove useless _ (before ! there is no need to use _) - replace sayTex$Lisp and mathObject2String$Lisp by macros. If you look at: http://fricas.svn.sourceforge.net/viewvc/fricas/trunk/src/algebra/scene.spad.pamphlet?view=log it will show you list of differences. If you click at appropriate 'Diff to previous xxxx' you will see changes (except for whitspace change where nothing is shown, but log entry should be clear enough). The changes are of limited size and quite regular (unlike your changes). > > But there is: code in category part will use functions in the > > domain. Of course each such function must appear in category > > export list, but definition may came from domain. > > > > There is no OO-dispatch because Spad values do not carry > > type information. But when you use code in category part it > > knows on behalf of which domain it is running and calls functions > > from this domain. So there is dynamic dispatch, just different than > > OO-dispatch. This is widely used in the algebra. > > Yes, I was probably getting errors because I was thinking in an OO way > as usual. I was assuming that the functions called in the category > would need to be declared in the category even if they are not defined > (abstract in my terms) so that the category can be type-checked > without knowing about the domains that might extend it. Is that what > 'category export list' does? This gets especially confusing to me when > these functions refer to % and have % as parameter. 'category export list' is list of functions declared in the category, before the 'add' part (which, if present implements some functions). > Are you going to make these changes? (it might be safer if you did) I think is better if you do this. Moving common functions to category part should be as simple as writing 'add' at end of SPointCategory and after that putting common functions. Then delete duplicates from domains. Of course, if you hit some problem I will help. -- Waldek Hebisch [email protected] -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
