Skip to content

Templates for Swift 3 Compliant with API Design Guidelines#194

Merged
dostrander merged 4 commits intoSwiftGen:masterfrom
afonsograca:master
Nov 9, 2016
Merged

Templates for Swift 3 Compliant with API Design Guidelines#194
dostrander merged 4 commits intoSwiftGen:masterfrom
afonsograca:master

Conversation

@afonsograca
Copy link
Copy Markdown
Contributor

In order to comply to SE-0023, some changes had to be made to the template stencils. Specifically:

  • Names of types and protocols are UpperCamelCase. Everything else is lowerCamelCase.
  • Prune redundant type names - Matched text extends to the end of the type name

@dostrander
Copy link
Copy Markdown
Collaborator

@afonsograca this looks good, just need an update with master :)

@afonsograca
Copy link
Copy Markdown
Contributor Author

@dostrander done!

This also solves a namespace issue that I came across today. Given the following strings:

"user.confirm" = "Confirm";
"user.confirm.title" = "Do you want to confirm?";
"user.confirm.description" = "Once you do you cannot go back.";

This creates a static string called Confirm and a struct Confirm making it ambiguous for the compiler.

@dostrander
Copy link
Copy Markdown
Collaborator

@afonsograca NICE that was one of the problems I had when I had attempted the dot-syntax for this. GOOD CATCH! Just waiting on building

@AliSoftware
Copy link
Copy Markdown
Collaborator

@dostrander don't forget to add CHANGELOG entries as you merge PRs 😉 so we keep track of changes as we merge them and avoid forgetting them later at release time.
(I usually even ask the OP to credit themselves in the CHANGELOG)

@djbe djbe added this to the 3.0.2 (or 3.1.0) milestone Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants