Skip to content

Reduce side effects #27

@DynamicGoose

Description

@DynamicGoose

Or: Make the ECS more functional

Important

Another major rework of the API would be required!
This is only an idea I had.

Goal

The main goal would be to make systems side-effect-less. A system should only take needed data as an input and return the modified data. After that, the ECS should handle reincorporating the data into the ECS world.

Why?

Doing it this way would offer a list of benefits:

  • eliminate the need for interior mutability used for multithreading, enabling better performance because of compile time checks
  • RwLock has been a pain to work with, because of the lack of compile time checks (all the issues with dead locks)
  • more user-friendly API

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions