https://github.com/47degrees/functional-error-handling
Functional Error Handling
https://github.com/47degrees/functional-error-handling
error-handling exceptions exceptions-raised functional-programming monads
Last synced: 3 months ago
JSON representation
Functional Error Handling
- Host: GitHub
- URL: https://github.com/47degrees/functional-error-handling
- Owner: 47degrees
- License: apache-2.0
- Created: 2017-02-01T22:11:53.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-03T23:50:38.000Z (about 5 years ago)
- Last Synced: 2025-04-11T21:11:48.739Z (6 months ago)
- Topics: error-handling, exceptions, exceptions-raised, functional-programming, monads
- Language: JavaScript
- Homepage: https://speakerdeck.com/raulraja/functional-error-handling
- Size: 4.79 MB
- Stars: 24
- Watchers: 49
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Functional Error Handling
Exceptions in OOP centric langs such as Java are abused for control flow and event signaling.
Lack of proper support for Monads, Higher Kinded Types and other facilities leave lang users
with no alternative but to choose happy paths as return types of method signatures.In this talk we will cover some examples regarding the misuse of exceptions and proper data types
such as `Option`, `Try`, `Either[E, A]` and `MonadError[M[_], E]` to model absence of values, failing
computations and alternate paths in method return types.- [PDF and slides on speakerdeck](https://speakerdeck.com/raulraja/functional-error-handling)
- [Code samples](src/main/scala/feh/examples)
- [Deck Markdown sources](deck/README.md)If you wish to run this in a local environment on reveal.js at http://localhost:8000/ :
```bash
git clone git@github.com:47deg/functional-error-handling.git
cd deck
npm install
npm start
```Credits:
- [Doctor Strange Love image and preview clip](https://en.wikipedia.org/wiki/Dr._Strangelove)
- [The Hidden Performance costs of instantiating Throwables](http://normanmaurer.me/blog/2013/11/09/The-hidden-performance-costs-of-instantiating-Throwables/)