> The Sage and Sympy projects both argued that there is a great deal of
> merit in choosing a mainstream language in which to develop a computer
> algebra system. In spite of their relative success compared to Axiom I
> still think that choosing Python as this language is too much of a
> compromise. Perhaps Scala is a suitable middle ground.

I think Scala is a much better match because of its combination of
static typing with functional programming and OO capabilities. Also
the syntax of SPAD and Scala are remarkably similar.

> So at this stage I am most just curious about the suitability of the
> language Scala itself as an alternative to SPAD and Aldor. I want to
> understand how it's object-orientation differs from Axiom and it's
> facilities for generic programming and abstract data types compares to
> Axiom categories and domains.

I tend to think of SPAD as having a sort of two layer object
orientation (although without polymorphism).

so if CliffordAlgebra is a class

then C := CliffordAlgebra(1,K,[[-1]]) is an instance of that class

and i:C := e(1) is an instance of the instance.

So I can think of many ways to implement this in Scala, for instance:
1) Implement the top two levels as an object and an instance of the
object. Then the bottom level is implemented by having a variable
'Rep' but adding a hidden pointer in so that it knows what object it
is associated with.
2) Implement the top two layers as a class definition using generics
CliffordAlgebra[K] with the Rep being an instance of it. (doesn't work
in this case because 1 and [[-1]] are values and not types).
3) Have two objects associated with CliffordAlgebra, one to represent
its type and another to represent its value.

I think option 1 would be closest to how SPAD works?

Of course there are lots of other issues such as how to bind a
function call to the required function definition, that is how to
implement the complexities of SPAD matching?

Martin

-- 
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.

Reply via email to