js-proposal-algebraic-effects

📐Let there be algebraic effects in JS (by macabeus)

Js-proposal-algebraic-effects Alternatives

Similar projects and alternatives to js-proposal-algebraic-effects

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better js-proposal-algebraic-effects alternative or higher similarity.

js-proposal-algebraic-effects reviews and mentions

Posts with mentions or reviews of js-proposal-algebraic-effects. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-24.
  • Letlang, a programming language targetting Rust - Road to v0.1
    3 projects | /r/rust | 24 Nov 2022
    Super interesting, there is a proposal to add this to JavaScript and several languages that use this, unison, koka & eff. I had no idea this was even a thing!
  • Go Replaces Interface{} with 'Any'
    10 projects | news.ycombinator.com | 14 Dec 2021
    Ok I was wrongly assuming that panic was expecting an error type, in fact it's an interface{}.

    > Your use of exceptions for flow control (i.e. goto) is considered harmful

    Exceptions are a way to delegate error handling to the caller by giving them informations about the unexpected behavior. It implies that the expected behavior is the "happy path" (everything went well) and any deviations (errors) is unexpected.

    This is far from a goto because you can have `try/finally` blocks without catch (or defer in golang).

    Also, exceptions are just a kind of algebraic effects that do not resume. There was a proposal to JS for this: https://github.com/macabeus/js-proposal-algebraic-effects

    This is also easier to test. assertRaises(ErrorType, func() { code... })

    Almost every Go library I've seen just return an error (which is just a string), you'd need to parse it to assert that the correct error is returned in special conditions.

Stats

Basic js-proposal-algebraic-effects repo stats
2
167
0.0
almost 3 years ago
The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
workos.com