3 ms·
I believe that null plane approach is wrong If error occurs then it should scream instead of silenting wrong stuff with empty behaviour objects Consider using
by hardware2win 4y ago
I believe that null plane approach is wrong
If error occurs then it should scream instead of silenting wrong stuff with empty behaviour objects
Consider using Result monad as a result of factory which will communicate if creation was successful and it will return either error or correct object
Basically return either
(success: false, null)
Or
(success: true, goodPlane)
You can also add diagnostic/message
- the_gipsy 4y agoIt's not a Result monad if it doesn't contain the Error, that's an Option monad. Null is enough for an option monad (if you don't have union/sum types).