Re:“Clean” Code, Horrible Performance
by Olreich on Wednesday March 01, 2023 @03:34AM
(#34980066)
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.
[ Parent
| on HN ]
There are no comments on this comment yet.