hurufu / nexoid-ed

Nexo 4 Executable Diagrams
GNU Affero General Public License v3.0
0 stars 0 forks source link

Consider converting bussiness logic from C to C++ #36

Open hurufu opened 3 years ago

hurufu commented 3 years ago

As time goes I begin to see issues that aren't easily solvable in C. They can be roughly divided into 2 categories:

  1. Technical
    1. Porting to Windows - this is big one, right now it's impossible to create DLL, without trying to jump over your head.
    2. Testing - Right now in order to test nexoid-ed it's needed to defined interface symbols for a test. Basically that means that in a single executable can be only single implementation of APIs (SCAPI, HAPI etc), which defies the point of testing, because normally we want to test different scenarios, like failure in a particular API call, etc. There is still a possibility to connect API to some scripting language and work with that, but for now experiments with libctl failed (#2).
  2. Non-technical
    1. Readability
      1. Operator overloading - It can simplify look of executable diagrams, which was the main point of them in the first place. ttd.transactionAmount > 1 is way more readable for non-programmer than amount_compare(ttd.transactionAmount, create_bcd(1)) > 1 or something similar.
      2. Implicit memory handling - It was solved partially using ptmalloc3 and memory pools, but still one have to use special macros acpval and acpptr to allocate a copy of a variable. This can be simplified with custom allocators in C++
hurufu commented 3 years ago

There is also a different proposition rewrite nexoid in Ada ...