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

Eliminate api.VolumeID? #76

Closed
bufdev opened this issue Dec 14, 2015 · 2 comments
Closed

Eliminate api.VolumeID? #76

bufdev opened this issue Dec 14, 2015 · 2 comments

Comments

@bufdev
Copy link
Contributor

bufdev commented Dec 14, 2015

On typing primitives, my experience: leave dynamic values untyped, static values (ie enums) typed.

I used to type strings like api.VolumeID the same way, but my experience has been that it just gets in the way and doesn't add any protection. Engs still end up casting whenever something doesn't work, and generally its just a bunch of annoying casting.

For enums, using strings (as I mention in #71) leads to insonsistent usage, as some engs will just use the freeform value, even though another eng might look at the list of values and think this is all that is used. We already see this with Filesystem - btrfs is used as a Filesystem, but is not defined. There were more to on the branch proto: https://github.com/libopenstorage/openstorage/blob/proto/api/api.proto#L11

Thoughts?

@gourao
Copy link
Contributor

gourao commented Jan 25, 2016

This has been addressed in REFACTOR.

@jvinod
Copy link
Contributor

jvinod commented Feb 3, 2016

merged #111

@jvinod jvinod closed this as completed Feb 3, 2016
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

3 participants