Example Project that uses witchcraft extensively
Hi,
first of all I am pretty excited about finding this library :D its awesome!!!
I was wondering if there is any real world project extensively using witchcraft, to find some practical examples of when it makes sense to use a specific categorie and specifically examples of expressive usages of categories in elixir (e.g. is there an example of code that becomes more expressive by using monads instead of processes).
first of all I am pretty excited about finding this library :D its awesome!!!
Thanks!
I was wondering if there is any real world project extensively using witchcraft
Yes, there are definitely real world projects using Witchcraft!
I've been in contact with a few of these projects, but sadly can't speak about them publicly (yet?) since they're proprietary at big cos. (I realize that this sounds like a cop out, but my hands are tied a bit here — I'd love to stick their logos in the README).
What I can say is that they tend to be projects where errors can be very costly, such as banking and stocks, or in products that need to be very modular and reusable.
I hear from a couple of projects that use it less extensively that they love the cleaned up Functor module (over Enum), especially helpers like async_map (it's not all about monads, folks!)
If anyone knows of other projects, please let me know!
more expressive by using monads instead of processes
Why not have both? These aren't mutually exclusive; they're different levels of abstraction. Processes are significantly more concrete than what you'd get with a monad, but they're fully compatible. You can kind of think of this as being like comparing a for loop and reduce.
I have a few toy examples to illustrate this in my 2017 Elixir London Keynote
Since you mention monads specifically, the monad section is at 31:31. YOu may also find the somewhat hand-wavier bit on Arrows at 37:04 interesting as well (RE abstraction)
I hope that helps!