Swift Mapping for Identifiers
A Slice identifier maps to an identical Swift identifier. For example, the Slice identifier Clock
becomes the Swift identifier Clock
. If a Slice identifier is a Swift keyword, the Slice compiler escapes the generated Swift identifier with backticks (`). For example, the Slice structure while
is mapped to a Swift structure or class named `while`
.
A single Slice identifier often results in several Swift identifiers. For example, for a Slice interface named Foo
, the generated Swift code uses the identifiers Foo
and FooPrx
(among others). If the interface's name is a Swift keyword such as protocol
, the generated identifiers are `protocol`
and protocolPrx
.