Bill Page wrote: > > Long ago on the axiom-devel list I expressed the opinion that the > concept of "representation" implemented by Rep, rep and per are such a > fundamental feature of SPAD/Aldor that they should be built-in to the > compiler. In that vain it has always seemed strange that a common > idiom in the language such as: > > Rep == SomeDomain > > (which looks like any other definition of a constant) is used to > introduce this notion. Although some might argue that it is too late > given the choice of Aldor and OpenAxiom, I still believe that Rep > deserves a more unique place in the language. Having thought about > this for a few years, here is one new suggestion that is still in > keeping with the desire to keep the number of new keywords in SPAD to > a minimum. > > Notice that the "add" keyword introduces a domain from which some code > and it's associated **representation** while be inherited, so really > there is no need to specify Rep in the following case: > > Foo(...): with > ... > == OldDomain add > ... rep ... per ... > > The Rep in Foo must be the same as Rep in OldDomain. > > On the other hand, if there is no OldDomain then it is necessary to > specify the domain that will represent this new domain. We could do it > like this: > > Foo(...): with > ... > == Rep(SomeDomain) add > ... rep ... per ... > > The general semantics of Rep(SomeDomain) would be exactly the same as > > Rep == SomeDomain > > in Aldor and OpenAxiom. >
Well, currently assignment (or definition) of Rep has magical properties. You propose to replace it by introducing magical Rep constructor. I do not think this is good idea. First, it is confusing -- AFAICS Gaby interpreted you proposal quite different than myself, so at least one of us is confused. Second, IIUC your proposal you replace small irregularity by a big one. Namely, in various places assignment to variables is used to introduce special behaviour -- so assignment or definition of Rep is not a big deal. OTOH your proposed Rep constructor is quite unlike any other use of constructors. -- Waldek Hebisch hebi...@math.uni.wroc.pl --~--~---------~--~----~------------~-------~--~----~ 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 fricas-devel@googlegroups.com To unsubscribe from this group, send email to fricas-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en -~----------~----~----~----~------~----~------~--~---