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

research/generic-option/ #6

Open
utterances-bot opened this issue Jan 5, 2023 · 1 comment
Open

research/generic-option/ #6

utterances-bot opened this issue Jan 5, 2023 · 1 comment

Comments

@utterances-bot
Copy link

(Generic) Functional Options Pattern

https://golang.design/research/generic-option/

Copy link

ebracho commented Jan 5, 2023

It's a little verbose but we can achieve this "multi-target options" API in a type safe way without relying on generics: https://go.dev/play/p/I8uvFr77PCm

It would be great if generics could do this in a less verbose way though!

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