#Functional Programming Pack For Unity

1 messages · Page 1 of 1 (latest)

spice copper
#

Hello, fellow Unity devs!

I'd like to share a project I've been working on: UniFP, a lightweight functional programming library designed to bring clean, explicit error handling to Unity without the GC overhead.

If you're looking for an alternative to deep if/else nesting and try-catch blocks for your game logic, this might be for you! It's heavily inspired by Rust's safety and performance philosophy.

Key Highlights:
✨ Zero GC Allocation: Core types like Result<T> & Option<T> are high-performance structs.
🦀 Rust-Inspired API: Write safer code by making success and failure states explicit in your type system.
🛤️ Clean Pipelines: Chain methods like .Then(), .Map(), and .Filter() to create elegant, readable data flows (Railway Oriented Programming).
🚀 Full UniTask Integration: Built-in support for clean asynchronous pipelines with .ThenAsync(), .MapAsync(), and more.

The README has a quick tour with clear "before-and-after" examples. Hope you find it useful!

GitHub Repo: https://github.com/nekoya404/UniFP-Functional-Programming-for-Unity

GitHub

C# Zero Allocation Functional programming for Unity powered by monad pipelines. - nekoya404/UniFP-Functional-Programming-for-Unity

pastel cradle
#

this is pretty cool. i do like rust's error handling

spice copper
#

thank you