3 ms·
> GenServers aren't difficult. You're right. GenServers are wonderful and simple. I'm just saying this problem doesn't need them. > Use the patterns… I am. M
by ashton314 2y ago
> GenServers aren't difficult.
You're right. GenServers are wonderful and simple. I'm just saying this problem doesn't need them.
> Use the patterns…
I am. Monads are just another pattern. You know the `with {:ok, ...} <- ... else ... end` pattern in Elixir? That's another monad!
I show one concrete example here in my post that monads cover well. I've come across other scenarios in industry where monads can cut down on boilerplate better than anything else. Would another solution work? Sure—it's a Turing-complete language. Would it be as clean? Sometimes not.
> Business rules, mud
I don't need definitions—I understand those concepts just fine. I'm just trying to understand why you think it's relevant to my post. What's the specific "mud" here?
- hi-v-rocknroll 2y ago> That's another monad! If you like monads, maybe you should look into Haskell or Idris. Please let me know when you write an interesting post that solves a class of problems rather than getting excited over something so trivial. Perhaps I'm jaded. Good luck to you.