4 ms·
If this is going to be a library where that’s a desirable feature, architect it for that feature. In the example, one easy way would have the coefficient table
by Olreich 4y ago
If this is going to be a library where that’s a desirable feature, architect it for that feature. In the example, one easy way would have the coefficient table be expandable/replaceable. If you really need to run arbitrary user code, then write an interface that the user will conform to and call their code. You don’t even need OOP support to do that easily, just typed function pointers.