4 ms·
> How do i know how this call chain behaves in production? > Where's all the logical exit branches from this for error recovery? Is this properly null checking
by agentgt 10y ago
> How do i know how this call chain behaves in production?
> Where's all the logical exit branches from this for error recovery? Is this properly null checking if required?
I see this in python and javascript all the time. This style of programming is what i call 'happy path' programming. It only works properly with valid input.
If this is done correctly this fluent pattern is usually a monad. This works really well with typed languages that have variant types that enforce pattern matching like Scala and Rust.
This pattern is actually far less error prone than imperative null checking (in my experience) as you have to to deal with the wrapped value but it can be equally tedious if the language isn't expressive.
An example of this syntax for Java can be seen in RxJava.