Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider unexporting the Systems type #16

Closed
mewmew opened this issue Apr 22, 2016 · 2 comments
Closed

Consider unexporting the Systems type #16

mewmew opened this issue Apr 22, 2016 · 2 comments
Assignees

Comments

@mewmew
Copy link
Contributor

mewmew commented Apr 22, 2016

To minimize the public API to the core concepts of ECS, I propose we unexport the Systems type. It may be considered an internal detail of the ecs package, and should users of ecs want to use a similar priority queue outside of World, the implementation of the sort.Sort interface is trivial.

The Systems type is only used by the private systems field of the World structure, and the Systems method on World returns []System rather than Systems. Therefore we may easily unexport it, without breaking too many users. And, obviously the time to make changes to core packages like ecs is now since #13 was just merged, and all users have to update their code anyways.

From world.go

type World struct {
    systems Systems
}

// Systems returns a list of Systems
func (w *World) Systems() []System {
    return w.systems
}
@EtienneBruines
Copy link
Member

SGTM.

@EtienneBruines EtienneBruines self-assigned this Apr 22, 2016
@mewmew
Copy link
Contributor Author

mewmew commented Apr 22, 2016

SGTM.

Would you mind me preparing a pull-request?

EtienneBruines added a commit that referenced this issue Apr 22, 2016
Unexport the Systems type. Fixes #16.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants