Settings

Theme

Everything I Was Lied to About Node.js Came True with Elixir

d-gate.io

33 points by mike1o1 9 months ago · 7 comments

Reader

rohan_ 9 months ago

Wonder what the author thinks about https://effect.website/

  • josh_p 9 months ago

    Thanks for this! I didn’t know this library existed. I’ve used a couple of other small libraries to get rust-like error handling and patterns into my Typescript projects. But this is way more comprehensive.

    I’m going to give it a try.

  • dyl000 9 months ago

    I like ideas from effect, I use my custom result type all over my application as well as my custom tryCatch & promise.allSettled wrappers.

    Issue comes down to you need to wrap all of your code in effect/results. Something like rust has that built in so you're not really 'jamming' it in there.

    It adds a bunch of boilerplate. Still better than the mess that is exception throwing.

  • phildenhoff 9 months ago

    Does Effect prevent workers that have uncaught exceptions from crashing the main thread in Node? Does it reduce the amount of memory workers use?

    • dyl000 9 months ago

      I’d assume effect would increase how much memory JS uses, you’re creating a bunch of memory junk.

      In theory it should make you able to contain errors with exception handing.

arend321 9 months ago

Previous discussion: https://news.ycombinator.com/item?id=43317950

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection