• TehPers@beehaw.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 day ago

    This is a super interesting approach to JS. Conceptually, it’s really cool. In practice, I don’t think I’d do it (at least for any projects I can think of) because explaining it to others would be difficult and representing complex logic as “commands” sounds a bit difficult.

    In a weird way, it reminds me of actor frameworks though. The difference is of course the separation of effects.

    One thing I wish the author would have done, though, is add some type hints. I know it’s about JS, but even some jsdoc types would have helped. It was a bit hard to know at first what the input types were to these functions.

    • Aijan@programming.devOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      23 hours ago

      Author here. In my experience, AI coding tools like Claude Code can write code in the Effect system style, and that could be a great starting point for getting developers not familiar with this approach on board.

      I considered adding JSDoc type comments, but that would make the code a bit verbose.