Skip to content

Conversation

@invzhi
Copy link

@invzhi invzhi commented Dec 21, 2017

  • Use empty struct instead of bool in Hub struct:
    clients map[*Client]bool -> clients map[*Client]struct{}
  • Update README.md

@elithrar
Copy link
Contributor

The empty struct 'trick' is a neat optimization, but it's a micro-optimization and can be confusing to newcomers. I'd prefer that we keep the (simpler, clearer) map[*Client]bool type in an example/demo app.

@elithrar elithrar assigned elithrar and ghost and unassigned elithrar Dec 21, 2017
@invzhi
Copy link
Author

invzhi commented Dec 22, 2017

I understand why. Thanks for your explanation.

@ghost
Copy link

ghost commented Dec 22, 2017

PR not accepted for the reason stated by @elithrar.

@ghost ghost closed this Dec 22, 2017
@ghost ghost locked and limited conversation to collaborators Aug 29, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants