DEV Community

aayush
aayush

Posted on

1

Why we don't have actor model instead of promises in JavaScript (or Nodejs).

Would love to have a productive discussion on this.

Please leave your thought in the comment sections.

Top comments (1)

Collapse
 
mremanuel profile image

I would say that the actor and message abstractions are unnecessary in most(?) occasions.

If you have a complicated system with lots of state change it might be a good way to set it up as a whole. But if you just need a few state changes and async actions here and there, building an actor-abstraction might be overkill.

I like the actor model too (I assume you do). It's simple to reason about and makes sense. But so does object oriented programming, and that can be a horrible choice for some type of systems. To understand the actor model better, I would be interested in hearing in what scenarios the actor model fails.

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post