Respect compiler directives #45
cjnevin-foxtel
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This one has been irking me for a while now and I haven't had a chance to investigate and add it myself.
Basically, I'd like to be able to define properties only for particular platforms or environments.
OS Examples
Depending on platform we can then define different variables in the same struct.
Currently I'd have to define 3 structs that are almost identical to generate a slightly different initializer for each or provide a struct named the same but containing different properties.
Debug vs Release
We can also do the same thing with #if DEBUG to only provide variables if we are debugging or provide different default values if we are debugging that may log their output for example.
Beta Was this translation helpful? Give feedback.
All reactions