Replies: 1 comment 4 replies
-
From what I can tell reading those links, "signal slots" doesn't look like FRP at all, it's basically just an event system. FRP is very different from an event system, it represents time-varying values as a first-class concept, and provides semantically correct functional ways to compose those values together. There are a lot of problems with event systems, including the "diamond update" problem (which FRP solves). Another issue that event systems have is that they need to allocate for every individual emitter (including intermediate emitters). Whereas It might be a good idea to read the tutorial to familiarize yourself on the API for Signals (though the tutorial doesn't explain the implementation or the design choices). As for your question, these are the problems I see with integrating an FRP system with ECS:
Those problems can likely be solved, but I don't have any immediate solutions. There is one way in which Signals could be very easily integrated into ECS: components can contain Mutables, and systems can update the value of those Mutables, however systems cannot listen to Signal changes. And the Signals are only used outside of the ECS system (e.g. with a hierarchical UI). In that situation everything works perfectly fine, because Signals aren't being used inside of systems, instead Signals are only used as a glue to connect systems to the UI. |
Beta Was this translation helpful? Give feedback.
-
As follow-up on bevyengine/bevy#254 (comment) .
@Pauan could you share your opinion why futures-signals or better the whole signal-slot pattern (which implements most of the "double pub-sub" functionality I had in mind in bevyengine/bevy#254 (comment) ) is and I quote a "fundamentally different paradigm" than ECS systems (bevyengine/bevy#254 (comment) )?
I'd say signal-slot ("live variables") actually fits the ECS paradigm very well - see e.g. one of my favourite signal-slot libs out there:
Beta Was this translation helpful? Give feedback.
All reactions