7 Matching Annotations
- Feb 2021
-
trailblazer.to trailblazer.to
-
While you could program this little piece of logic and flow yourself using a bunch of Ruby methods along with a considerable amount of ifs and elses, and maybe elsif, if you’re feeling fancy, a Trailblazer activity provides you a simple API for creating such flow without having to write and maintain any control code. It is an abstraction.
-
-
github.com github.com
-
So, what can we do to check for None in our programs? You can use builtin Optional type and write a lot of if some is not None: conditions. But, having null checks here and there makes your code unreadable.
-
-
sobolevn.me sobolevn.me
-
Return None. That’s evil too! You either will end up with if something is not None: on almost every line and global pollution of your logic by type-checking conditionals, or will suffer from TypeError every day. Not a pleasant choice.
-
-
dry-rb.org dry-rb.org
-
Writing code in this style is tedious and error-prone.
-
Monads provide an elegant way of handling errors, exceptions and chaining functions so that the code is much more understandable and has all the error handling, without all the ifs and elses.
-
-
jrsinclair.com jrsinclair.com
-
It’s definitely better than littering our code with endless if-statements.
-
-
functionalprogramming.medium.com functionalprogramming.medium.com
-
polymorphic method inside shape class, its possible to discriminate them. without if’s.
-