3 ms·
Actors is one of the worst programming models possible. It's hard to observe actor-based systems and debug them. The protocol complexity (and complete protocol
by pshirshov 3y ago
Actors is one of the worst programming models possible. It's hard to observe actor-based systems and debug them. The protocol complexity (and complete protocol informality) usually brings much more trouble than any kind of locking/synchronization.
- deleted 3y ago[deleted]
- lll-o-lll 3y agoI’ve had good success with actor based models. When you say “protocol complexity”, I don’t understand what you mean. Observation requires good logging, but this isn’t out of line for any complex system. Debugging (as in actual breakpoints in an IDE or post-mortem analysis) can be facilitated with stack tracking (this same problem occurs with async await patterns and is solved in a similar way). The advantages and disadvantages exist, but I think it’s an extremely effective programming model for many use cases. Formal state-machine programming, that’s the worst model, unless you need it.
- hot_gril 3y agoFor game dev or in general? I hate using actors for general backend stuff, but for game dev maybe it makes more sense.
- legosexmagic 3y agoActors tend to lead to bloated incomprehensible code. Even when you do want game objects to look like independent message passing actors. Faking it is always easier. Actors are self defeating because they turn everything into a distributed system.
- hot_gril 3y agoThat's what I was thinking. I'm trying not to write Actors off because I'm not an expert on game dev and can imagine the possibility of an unusually large-scaled game. But yeah, if you're writing a typical game, I imagine you're best off doing it the typical way that's been optimized for.