An open API service indexing awesome lists of open source software.

https://github.com/sixpounder/pigeon

Java library of types for never-throw oriented programming
https://github.com/sixpounder/pigeon

java never-throw utility

Last synced: 2 months ago
JSON representation

Java library of types for never-throw oriented programming

Awesome Lists containing this project

README

          

# Pigeon

**Pigeon** is a Java library that provides a safer, exception-free approach to error handling. It leverages *never-throw* oriented types, such as `Result` and `Option`, to manage success and failure explicitly, inspired by functional programming paradigms. With Pigeon, errors are no longer hidden behind exceptions, promoting cleaner, more maintainable code by making error handling a core part of the type system.

## Features

- **Never-throw philosophy:** Avoids traditional exception handling in favor of `Result` and `Option` types, ensuring all outcomes are explicitly handled.
- **Core types:**
- `Result`: Represents an operation's success (`Ok`) or failure (`Err`).
- `Option`: Encapsulates a value (`Some`) or the absence of one (`None`).
- **Utility types**:
- `Metadata`: Decorates a type with metadata
- **Chainable API:** Methods are designed to be easily composed and chained, leading to concise and expressive code.
- **Explicit error handling:** Prevents silent failures and ensures all potential errors are addressed at compile time.
- **Functional approach:** Aligns with functional programming practices, encouraging pure functions and immutability.

## Installation

To use Pigeon in your project, add the following dependency to your `pom.xml` (for Maven):

```xml

org.storynode
pigeon
0.1.0

```