Monads and monoids in julia

I agree - I think knowing Haskell prior to julia helped me a lot - map/fold/recursion and basic functional patterns are great to know. But mostly you don’t need anything related to lift/bind/monad, just as you drop most OOP patterns like Visitor etc.

After using julia for a few years I get the feeling that a lot of programming patterns are really crutches to work around limitations of a langage. Most of the common patterns people talk about are for solving problems that we don’t have in Julia - because compilation happens at runtime and can be dynamic if the compiler can’t resolve the type, and because of multiple dispatch.

There are some other pattern crutches like Holy traits that julia has that have developed for Julias’ own unique inadequacies. Those things are probably better to focus on! Learning the type system, multiple dispatch and holy traits will give you a lot.

Maybe you should also check out (but I haven’t actually read it yet):

https://discourse.julialang.org/t/new-book-hands-on-design-patterns-and-best-practices-with-julia/

5 Likes