> < ^ Date: Fri, 19 Feb 1999 13:26:55 +0000
> < ^ From: Steve Linton <sal@dcs.st-and.ac.uk >
> < ^ Subject: Re: 1. OO gap. 2. symmetric function coefficients.

Dear GAP Forum,

I can answer the first part of this:

1. Are there any moves afoot to write a version of GAP in C++ and/or and
object-oriented version of the GAP language?

If so I'd be interested to know about it.

If not, would there be any interest in such a project?

The GAP kernel is written in C and the libraries in GAP. If one were starting
now, one might well choose C++ for the kernel, but when GAP development began
C++ compilers were not widely enough available and the language was not
sufficiently standardized, and now, there does not seem to be enough benefit
to merit the huge task of rewriting the kernel.

The GAP3 library was, in many ways object oriented, although (a) the
usual terminology of OO programming was not used and (b) the OO features were
explicitly implemented in the library rather than being built in. Most GAP3
objects included operations records which contained many of the methods
applicable to them. A limited form of inheritance was achieved by copying
these records.

In GAP4, we have gone beyond this in a number of ways. The paper "The GAP4 Type
System: Organising Algebraic Algorithms" by Thomas Breuer and myself describes
the system and includes some remarks comparing the system with "standard"
object-oriented systems. It can be found on the WWW at
http://www-gap.dcs.st-and.ac.uk/~gap/Info/talks.html (or in the equivalent
location on any of the mirror sites).

Very briefly, the two main advances are that choice of
Method for an Operation can depend on the Types (classes in standard
parlance) of ALL the arguments, not just on one and that as more is learnt about
Objects during their lives, their Types can change to reflect that and allow
more specialised (and so faster) Methods to be selected.

Feel free to contact me directly if you want to talk about this in more detail.

Steve


> < [top]