I would like to implement an algebra (addition, multiplication, etc.) for what is called "truncated power series" (TPSA) (Differential Algebraic description of beam dynamics). .
These 'objects' (sets of complex numbers) have special rules for addition and multiplication. Of course the easy way to go is just to use plain lists and redefine functions like myAdd, myMult, etc. acting on these lists.
However in most implementations in other languages these objects are represented as real objects (OO) of a 'TPSA' class, and operator overloading is used to manipulate them.
My question is: I know the last solution is not the way to go with Mathematica, but the first easy way doesn't seem the best one either. How would you advice to implement that with Mathematica ?
Edit: The root of my question was apparently "what is an up-value", the answer below about dual number also points in that direction.