This pattern looks like a very rudimentary form of pattern matching in FP-oriented languages. I use it a lot for similar reasons you mentioned.
In Scala, for example:
There's a lot more, probably warrants its own blog post 😁
Hi Herdy, you're not the first one to mention Scala as a comparison, but I haven't really tried it yet. I'll be looking forward to this post then!
I've just written a post on a different pattern, if you'd like to take a look and give your two (or more) cents I'd really appreciate!
dev.to/tomazlemos/keeping-your-cod...
Thanks for your feedback!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This pattern looks like a very rudimentary form of pattern matching in FP-oriented languages. I use it a lot for similar reasons you mentioned.
In Scala, for example:
There's a lot more, probably warrants its own blog post 😁
Hi Herdy, you're not the first one to mention Scala as a comparison, but I haven't really tried it yet. I'll be looking forward to this post then!
I've just written a post on a different pattern, if you'd like to take a look and give your two (or more) cents I'd really appreciate!
dev.to/tomazlemos/keeping-your-cod...
Thanks for your feedback!