Suggestion - Use protocol for generated code #62
Replies: 3 comments
-
@ConfusedVorlon Thank you for opening up this discussion. There are two topics mentioned here, I will answer them separately:
I think that's Apples preferred way of dealing with this situation, but if you have a good reason not to do that, feel free to create a feature request and explain your use case there so I can think of a good solution to help you accomplish what you want. Your above-suggested solution is just one of many ways I can imagine tackling this if needed. |
Beta Was this translation helpful? Give feedback.
-
Thanks - I was not aware of the per-app language setting. |
Beta Was this translation helpful? Give feedback.
-
I converted this discussion into this issue: #82. I'm locking this now, please add future comments there. |
Beta Was this translation helpful? Give feedback.
-
I have a suggestion. Instead of generating code for string and locStringKey in every single enum, why not make the enum conform to a protocol - and provide the code in a default conformance.
This would simplify the code somewhat - but it would also set you up to let users add their own protocols as an app setting (more below)
Here is a simple generated interface rewritten with a
FoxKey
protocolHowever - I'd like to actually rewrite that code in my own project.
I can simply check an option somewhere to ask that you don't add the protocol and conformance definition at the top of the generated file
Then I provide my own implementation of FoxKey
Beta Was this translation helpful? Give feedback.
All reactions