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

What should we do about constants? #19

Open
Haud opened this issue Feb 1, 2016 · 3 comments
Open

What should we do about constants? #19

Haud opened this issue Feb 1, 2016 · 3 comments

Comments

@Haud
Copy link
Contributor

Haud commented Feb 1, 2016

Discussion emerged as to how we should handle constants in Swift. Should they be in enums? Structs? Globals? Some other thing we're not aware of?

Do we have any resources that have a strong drive one way or the other? I cannot find any, and until we do, I vote we should avoid ruling on it until we have a good reason to encourage / discourage one use case over the other.

This is one resource: http://www.jessesquires.com/swift-namespaced-constants/

@ayushcshah
Copy link

The approach shown by jessesquires is informative and innovative in handling resources, but I think R.swift pod is also a good competitor for managing resources.

@Haud
Copy link
Contributor Author

Haud commented Apr 14, 2016

@ayushcshah thanks for the feedback! That pod is pretty interesting, though I don't think it would make sense as part of the style guide. I think what we're seeing is that there are multiple valid routes; I've read that post by jessesquires before as well, and it's definitely informative but I don't feel it's necessarily definitive, if that makes any sense

@ayushcshah
Copy link

Yup, makes sense.

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