Implementing a vector class in Delphi?

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?

+3
source share
2 answers

It depends on your priorities.

, . , .

, , . , DLL , , DLL .

Botom, .

+3

, .

+2

Source: https://habr.com/ru/post/1727371/


All Articles