News for hackers. Stuff that matters.
Re:Julia's multiple dispatch explained with Pokemons by snicker7 on Wednesday July 21, 2021 @01:00AM (#27902501)
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.

Re:Julia's multiple dispatch explained with Pokemons by dgb23 on Wednesday July 21, 2021 @03:02AM (#27903172)
I like data driven programming too. The code can become more declarative this way and the logic more malleable.