Ralf, Yes I know that Aldor tries very hard to move as much as possible into the library - even the use of Rep, rep and per as you say. In a sense the Aldor compiler is intended to be as small as possible. Its kind of like a "reduced instruction set" design of a computer. The idea is the if you do just this minimum perfectly and as efficiently as possible, everything else can be done at a higher level without penalty. But in this sense Aldor was trying to be a general purpose language like C.
Instead of being local functions, one could in fact build Rep, rep and per into the FriCAS library and then import them in a package but unfortunately calling package functions does result in some run-time overhead. If we really wanted to do this, rather than introduce an )include feature I think it would be more worthwhile considering how to get rid of this run-time overhead for at least certain simple kinds of package calls as this. SPAD on the other hand is very much a "domain specific language". It tries to provide the fundamental language features that one needs for computer algebra and (perhaps) computational mathematics in general. I do not see anything wrong with the fact that SPAD builds in the notion of Record, Union, Mapping and several other such basic constructs. If we didn't have these constructs already in SPAD then we would surely have to implement something equivalent in the library - the way Aldor does. In fact in Aldor we could in principle do this several different ways. And to me from my current point of view this is a problem. I would prefer for the language itself to be higher level and to have fewer ways of doing the same thing - provided of course that we can be sure they are the "right" way of doing things. By right way I mean something like an appeal to generality, something like category theory. Regards, Bill Page. On Thu, Jan 19, 2012 at 9:37 AM, Ralf Hemmecke wrote: >> Ralf, Why would you suggest using a macro when a function definition >> is sufficient? These functions do not introduce any overhead. Worse, >> why suggest two different ways of doing the same thing? :( > > > If they don't introduce *any* overhead, I prefer functions. But even if the > compiler can compile function calls away, I don't want to see needless > definitions. Extra need for definitions counts as overhead. > > I am actually not sure that the OpenAxiom way of somehow building Rep into > the language, is a good thing. Given the fact, that some representation is > needed, it seems reasonable, but it's not necessary. > > In Aldor "Rep", "rep", and "per" are just conventions. I would bet that the > compiler does nowhere rely on the special identifier "Rep". > > Ralf > -- 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.
