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

Make gl2.New take self-referential option arguments. #53

Closed
slimsag opened this issue Nov 26, 2014 · 0 comments
Closed

Make gl2.New take self-referential option arguments. #53

slimsag opened this issue Nov 26, 2014 · 0 comments

Comments

@slimsag
Copy link
Contributor

slimsag commented Nov 26, 2014

Right now gl2.New takes a single keepState bool argument. This doesn't allow for expansion in the future. We should use Rob Pike's design:

Self-referential functions and the design of options.

gl2.New(false) would become just gl2.New()

and

gl2.New(true) would become gl2.New(gl2.KeepState())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants