|
|
|
|
|
by CharlieDigital
252 days ago
|
|
Exactly what I've observed in practice because most devs have no background in writing functional code and will complain when asked to do so. Passing or returning a function seems a foreign concept to many devs. They know how to use lambda expressions, but rarely write code that works this way. We adopted ErrorOr[0] and have a rule that core code must return ErrorOr<T>. Devs have struggled with this and continue to misunderstand how to use the result type. [0] https://github.com/amantinband/error-or |
|
Agreed with getting developers to see the value. The most convincing argument I’ve been able to make thus far has been “isn’t it embarrassing when your code explodes in production? Imagine being able to find those errors at compile time.” The few who actually understand the distinction between “compile time” and “run time” can usually appreciate why you might want it.