Joel Richman gave a presentation on composable code, including using a library.
https://www.pluralsight.com/courses/csharp-applying-functional-principles pluralsight course given by Vladimir Khorikov
https://www.pluralsight.com/courses/csharp-applying-functional-principles pluralsight course given by Vladimir Khorikov
https://github.com/vkhorikov/CSharpFunctionalExtensions Vladimir Khorikov github with source code and links to his blog posts.
https://www.nuget.org/packages/CSharpFunctionalExtensions/ nuget site for library.
Main bullet points -
- Lots of way to handle error handling.
- Exceptions (try/catch).
- Error codes and messages.
- Nulls can be tricky...passing around...nothing (but a still valid value), null checks everywhere.
Functional Design can help!
- Get rid of primitive obsession. (And validation logic everywhere).
- Chain operations, handle input and errors. (Don't Repeat Yourself with input and error handling...makes chaining common functionality easy to read.)
- Make nulls explicit with maybe type.
Screenshot of Readme of repo is worth a thousand words!

No comments:
Post a Comment