Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • I can't wait for Rust to someday have something even part way as clear at composing systems.

    Eventually I really hope we see programming languages that lean back in to what Erlang started more. This is a leap, but imo having inbuilt great patterns for system design would look a whole lot like Effect! Systems practically assemble themselves. There's great powerful meaningful abstractions under foot.

    The only other meaningful effort I can call out is Clojure, which made a handful of good primitives. That community only really used atoms and defs, less refs (software transactional memory) and agents, is what I've been told.

  • I’ve been using the beta on three separate projects for quite a while now and it has been totally pain-free. I mostly use the v3x core library (which has expanded to contain other libraries in v4) and Schema so I can’t speak to much outside of those, but I trust they’ve done a great job all around.

    I don’t see it mentioned here, but 4 also comes with a much simpler API in some modules. Schema is much better. It’s an exceptional update. I followed many of the video logs on YouTube and was impressed by the team. This is one of my favourite software projects, period. This rebuild is incredibly well done, and I hope a lot of people are willing to try it out and adopt it, especially with the LTS.

  • Is there a way to implement Effect without it becoming a leaky abstraction that takes over your whole app? Presumably you'd have to create an entire abstraction layer with strict boundaries, such as nestjs does with RxJS Observables, but even that has problems with leaking Observables when you need to hook into the framework's lifecycle.
  • It is hard to understand why one would want to introduce this into their codebase given how functional javascript is right away. It lives in the spectrum of rxjs - super powerful, but is it necessary? Can all of those concepts be distilled down into what you would use on the day to day (just a few), with less concept density, and just as much functional goodness?
  • Can someone explain why this is a good idea? There is a ton of magic here, since the value string is not even part of the UserName function signature. Dependency injection is not about hiding your dependencies. On a first look, this seems to be really bad, but I might be totally misunderstanding this library.

        import { make, useAtomValue } from "@effect/atom-react"
        import { Atom } from "effect/reactivity"
        import * as React from "react"
        import { renderToStaticMarkup } from "react-dom/server"
    
        const User = make((name: string) => Atom.make(name))
    
        function UserName() {
            const atom = User.use()
            const value = useAtomValue(atom)
            return React.createElement("span", null, value)
        }
    
        export function App() {
        return React.createElement(
            User.Provider,
            { value: "Ada" },
            React.createElement(UserName)
            )
        }
    
        renderToStaticMarkup(React.createElement(App)) // => "<span>Ada</span>"
    
    (src = https://effect.website/docs/v4/api/atom-react/ScopedAtom)
  • I was (still am) a huge fan of fp-ts [1], which, in effect, was rolled into the Effect-TS ecosystem. And I'm still bummed TS+ [2] didn't work out, because I've never managed to love Effect-TS the way I loved fp-ts.

    Maybe it's the lack of tacit function calling, the conventions, AI/modern-marketing push, or simply the daunting scope and scale (even more so with v4).

    Still, despite my gripes, if you're willing to spend the time and effort, it's the safest and most elegant way to write TypeScript. Plus, it's now dependency-free, and the increasingly good LSP/editor support removes a lot of the friction that used to come with completions and diagnostics.

    [1] https://github.com/gcanti/fp-ts [2] https://effect.website/blog/ts-plus-postmortem

  • Three clicks, no info what effect 4.0 is, except that it's AI-ready, safe, good, and re-built from the ground up. No idea what it actually is.
  • It’s wild how easy it is to build robust systems with Effect.

    I’m working on a little social media web app and it has been so incredibly simple to build the API and a background worker process with Effect. I get logging, telemetry, error handling, concurrency, API doc generation, and more for free!

    I think this library gets somewhat maligned for being complex, which I don’t think is fair for how much it offers given how much more complex a an equivalent solution would be without Effect.

    With v4, I also don’t feel like I am even having to wrestle with TypeScript’s type system at all. I define some basic interfaces for my services and schemas for my data models and everything is just inferred through usage for the most part. It honestly starts to feel like I’m writing JavaScript for the most part.

    This library gets lots of comparisons to functional programming languages/libraries, which is fair, but I think someone working in .NET/C# would be feel right at home.

Explore Birbla archives