PsiQ / bartiq

Bartiq
https://psiq.github.io/bartiq/
Apache License 2.0
31 stars 9 forks source link

Should we indicating whether a routine is compiled or not #64

Closed mstechly closed 1 month ago

mstechly commented 5 months ago

Currently Routine can be in two states: uncompiled or compiled, which have some differences:

This is confusing, as every time I look at test cases for evaluate, I wonder why there are no linked_params and how do we know that the symbols mean the same thing, only later to realize that these are already compiled.

Not sure what's a good way of handling that – two that come to mind are:

  1. Add a field "compiled": true/false which would indicate what's the state of the routine?
  2. Have separate classes for uncompiled and compiled routine?

It's also worth noting that validation rules for compiled and uncompiled routines should be different (https://github.com/PsiQ/bartiq/issues/18).

This is related to https://github.com/PsiQ/bartiq/issues/21.

CC: @dexter2206