Netvent/storyly-sdk

Swift naming conventions for enums

Closed this issue · 2 comments

bkunat commented

Issue tracker is ONLY used suggestions.

StorylyEvent enum does not follow Swift guidelines for enum cases. Id appreciate if you could fix this.

// WRONG
case StoryGroupOpened
case StoryGroupUserOpened
case StoryGroupDeepLinkOpened

// RIGHT
case storyGroupOpened
case storyGroupUserOpened
case storyGroupDeepLinkOpened

Hello @bkunat ,

Thanks for suggestion!

Swift's API Design Guidelines' General Convention sections indicates a general rule for case conventions;

Follow case conventions. Names of types and protocols are UpperCamelCase. Everything else is lowerCamelCase.

That suggestion, starting with lower case, is the convenient way in terms of styling.

However, we need to consider backward compatibility for the current user base before refactoring any public APIs. In this case, this will have a considerably huge impact on the integration part for the update scenario, we don't consider any change for now.

Thanks,