2 Nov
2000
2 Nov
'00
6:06 p.m.
IMHO, users of GiNaC should not reply on the internal representation of algebraic objects (even that op(nops()-1) thing is suspicious to me), because that representation has changed, and will change sometime in the future. Extensions to GiNaC in the form of new classes, however, may benefit from or even require access to the internal representation, in which case the C++ "friend" mechanism can be used.
The main problem is however that the friend declaration must be present in GiNaC source code not in the extension source code. Anyway, I don't see any difference in accessing internal representation via a friend class or via members as soon as it is documented that these members might change in the future. I don't like bureaucraty!