by vantassell · 2mo ago · 0 comments
Their main page makes the product pretty clear.
> Reliable TypeScript for the AI era
It is a library.
To be fair "algebraic effects" is part of my priors. If you don't know what that is those specific words won't help you, but the examples should!
But that can't be a library? Must be a framework? (eg more batteries included)
That's not the definition of a framework.
You call a library. A framework calls you.
I can't parse this into meaning anything:
"Reliable TypeScript for the AI era
Build production-ready systems your team can ship, customers can depend on, and AI agents can work with."
OK, it's written in TypeScript, I guess. Is it a library? What does it do?
import { Effect } from "effect"
const divide = (a: number, b: number): Effect.Effect<number, Error, never> =>
b === 0
? Effect.fail(new Error("Cannot divide by zero"))
: Effect.succeed(a / b)
Effect.runSync(divide(4, 2)) // => 2
This seems to be similar in spirit to railway oriented programming (see e.g. https://returns.readthedocs.io/en/latest/pages/railway.html), but I’m not 100% confident here. type Result e v = Ok v | Err e
https://en.wikipedia.org/wiki/Result_type