4 ms·
I think the arguments on both sides are valid. In dynamic programming languages, I generally prefer factoring business logic outside of procedures and into loo
by snicker7 5y ago
I think the arguments on both sides are valid.
In dynamic programming languages, I generally prefer factoring business logic outside of procedures and into lookup tables. This is sometimes called "data-driven" or "table-oriented" programming. It eliminates control flow, which makes code more maintainable and less buggy.
Using Julia's dispatch mechanism accomplishes a similar goal. Here, multiple dispatch is akin to a table lookup. It may even be faster than the explicitley data-driven approach since the lookup can be done in compile-time.
- dgb23 5y agoI like data driven programming too. The code can become more declarative this way and the logic more malleable.