axiom-developer
[Top][All Lists]

## Re: [Axiom-developer] about Expression Integer

 From: Ralf Hemmecke Subject: Re: [Axiom-developer] about Expression Integer Date: Tue, 21 Feb 2006 12:05:11 +0100 User-agent: Thunderbird 1.5 (X11/20051201)

```On 02/20/2006 10:02 PM, Gabriel Dos Reis wrote:
```
```Ralf Hemmecke <address@hidden> writes:
| Hmm, do you call the following object-oriented?

Yes.

| (That code appears in libalgebra distributed with Aldor and it
| basically provides a generic function that given a function "f: R ->
| S" returns a function "map(f)" of type "RX -> SX" that applies "f" on
| the coefficients of a univariate polynomial.)
```
| | UnivariateFreeRing2(
```|      R : Join(ArithmeticType, ExpressionType),
|      RX: UnivariateFreeRing R,
|      S : Join(ArithmeticType, ExpressionType),
|      SX: UnivariateFreeRing S
| ): with {
|       map: (R -> S) -> RX -> SX;
|       map(f:R -> S)(p:RX):SX == {
|               q:SX := 0;
|               for term in p repeat {
|                       (c, n) := term;
|                       q := add!(q, f c, n);
|               }
|               q;
|       }
| }
```
| | What is the class and what are the methods?
```
The class is the collection of "things" that you can "pretend" to be
univariate polynomials.
```
```
```
Oh, I think that is wrong. The "univariate polynomials" come as a parameter and have nothing to do with UnivariateFreeRing2. As Bill mentioned, if that is considered to be a class, then it has no instantiations. It's a package in "Axiom" terms.
```
```
```| Sorry that I don't know CLOS,

The reason why I mention CLOS is that it is close to Lisp (given the
general topic of this mailing list :-),
```
```
```
Oh, if LISP is the general topic of this mailing list, then I should be quiet. ;-)
```
```
```| BTW, I don't say that Aldor hasn't some kind of object-orientation,
| but it is in my opinion not a pure object-oriented language.

My view is that debates of "pure" <your-favorite-buzzword> are
```
meaningless as far as productive system building is concerned. So, I will stop here.
```
Right. I'll also stop.

Ralf

```