ForneyLab.jl icon indicating copy to clipboard operation
ForneyLab.jl copied to clipboard

Remove antipatterns

Open ThijsvdLaar opened this issue 4 years ago • 1 comments

This blogpost from Lyndon White mentions several antipatterns for Julia code: https://white.ucc.asn.au/2020/04/19/Julia-Antipatterns.html (thanks @bauglir for pointing this out). Some of the antipatterns mentioned here are also present in the FL code.

  1. The most prominent one is the over-constraining of argument types. Some very specific constraints are needed for the update rules, but in other places the constraints need not be as strict as they are now;

  2. There are also still some Dicts that should be NamedTuples;

  3. We could make more efficient use of Julia's type inference system to get rid of the matches functions that are used for update rule-matching.

  4. Macros, e.g. @symmetrical can be improved for clarity

ThijsvdLaar avatar Apr 20 '20 08:04 ThijsvdLaar

Dmitri will propose an improvement to 4)

ThijsvdLaar avatar Apr 28 '20 11:04 ThijsvdLaar