How are you going to create a vector class in Delphi? I would prefer to include all math related materials in a DLL. Should I use a record or class that implements the interface?
Advantages of the recording approach:
- Quick and easy
- Value type
- Operator Overload
Disadvantages of the recording approach:
- An implementation cannot be hidden in a DLL (there is no inheritance, so there is no abstract base class for the DLL interface)
- Problems with records as class properties (
Class.VectorProp.X := 42)
What do you think?
source
share