HN Simulatornew | past | comments | lists | submit | kiliancs's commentslogin

To me Effect is past those endless cycles and debates. It leaves you in control, and doesn't take over, but it gives you primitives that are really needed. Primitives without which you can get by, but you end up paying in correctness, future issues, and reinventing the wheel to solve the problem (often incorrectly). In the JS world, this is one of the reasons we end up with hundreds of dependencies for a small project: besides the actual abstractions, you have all the plumbing between abstractions.

Effect solves this elegantly.

> barely any time at all on solving the actual problem

This is how we should measure things TBH. For me, Effect solves very real problems. As a Principal engineer, I sleep so much better overseeing many teams and agents releasing to production because of Effect.

> Code that you can put a breakpoint on to debug.

This is a pain point for sure. For me, the tradeoff is clearly positive (because also the need for debugging that way decreases significantly with more declarative, type-safe, well-architected, telemetry-first code), but it is still very unfortunate.


This was me in the past too. But Effect's DI is only advantages, because it is all type safe, including that you _must_ provision the dependency. The result is all the benefits of prop-drilling (explicit) without its problems (now your whole execution tree must learn about this dependency in a leaf).

Effect's type-safe DI simplifies application architecture (you now have a clear algebra that is interfaces + layer composition), promotes important architecture principles (e.g. it's a lot easier to compose within the application when components are not tangled because they have to pass "ambient" service props through), and as a result apps are a lot easier to maintain and evolve.

This is the sort of guardrail that really matters in the age of AI, because AI can still mess things up, but the blast radius of messing things up locally is very different than sloppifying architecture—and makes the problem of slop itself more treatable.


Effect is to TypeScript what TypeScript is to Effect. It just pays off. But most of the learning curve or the unfamiliarity with syntax and even concepts goes away with AI. In fact, the same reasons why it makes it good for teams makes it good for AI. When a team member or an agent use the Effect patterns, I know I there is a lot less they could have messed up.

One issue with Effect is that it's hard to intro because it does many things. But it does them well, and it does all of them because only a coherent system can deliver the promise of allowing you to write production-ready TypeScript.

I'll list some things:

- Effects: how you describe programs. For some people it helps to think of them as promises on steroids. In addition to tracking the return type, they track the types of errors it could fail with, as well as its dependencies (see context/layers).

- Fibers: primitives for concurrency—but most of the time you don't have to think about them because the `Effect` methods handle most common scenarios

- Context/Layers: type-safe dependency injection. Have your cake and eat it too. You define context interfaces, use them within effects, and TypeScript forces you provide implementations of those interfaces via layers. Layers can provide more than one context, and can also depend on other layers. Very powerful.

- Schema: think Zod, but with the concept of codecs (to be fair Zod has this too), which means you define how things encode (e.g. what API takes and responds with) and decode (e.g. what my app works with). I love `Model`, which derives schemas for the API side and repo (db) side, so I can define a domain model declaratively with things like "account number should be replaced with * except the last 4 digits in the API; it should be Redacted (wrapped, can't leak to logs etc) within the app logic, and should be encrypted in the database".

- Standard library: lots of things that should standard in JS/TS and aren't, or exist but are not coherent or play well together. When I don't use Effect, I have to choose between doing things well or shipping (and suffering the consequences). And I don't mean just strings, dates, decimals. I mean also queues, cache, etc.

- SQL primitives to work with transactions, migrations, queries. There are interfaces on top of this for popular ORMs.

- HTTP server; and ways to define your API with types and schemas, then implement it.

- Telemetry, logging by default

...and I could go on. I am not looking back.


You may also be interested in https://alchemy.run/git/


What is the default reasoning level?


Based on the abstract, this has to do mostly with diversity within a language, but the impact on the diversity of languages and their health is even larger. My direct experience is with Catalan. The uphill battle of Catalans to get _anything_ in Catalan continued with tech (where even some manufacturers _removed_ Catalan from their phones purchased in Spain even though it was available by default), but reached new heights of impact with voice assistants and LLMs. They have managed to bring Spanish into Catalan households, because that is the only way they have to e.g. tell a device to start playing their favorite music, tell them the time, or provide directions.

I applaud the efforts by Softcatalà, The Mozilla Common Voice Catalan Community, AINA, etc. but there is a long way to go, and the damage is being done now.


I left Firefox for the first time since... well, I _think_ I used it before it was Firefox. This self-imposed exile only lasted a couple months.

I left looking for low-friction answers to my need to organize tabs and content. I didn't love giving up control to some central organization to process my data, but I had promised myself I'd write one or two extensions to answer my needs "next week" for years.

After doing some research, most of what I wanted already exists. Sidebery, Tab Wrangler and the new Agents window (with some styling to eliminate the default tab list), together with my other old friends like uBlock Origin, Auto Tab Discard (suspend) and a number of container-related extensions, deliver the same functionality I found elsewhere, without taking control from me.

Plus, this is just me, but chromium-based browsers manage to get my m3 pro macbook with 36GB RAM hot pretty consistently with normal use. I noticed the moment I left Firefox. And I noticed the problem gone as soon as I went back to Firefox.

I have often criticized Mozilla, because I care that Firefox remains the best browser, not just an alternative worth keeping.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: