Keywords
The following words are treated as keywords in Swift and have special meaning:
RemObjects Swift Keywords
RemObjects Swift adds the following handful of keywords to support some Language Extensions in Apple's standard Swift implementation:
__abstract
— used for explicitly marking methods and types as abstract__await
— .NET-style unwrapping of asynchronous calls__ensure
— Class Contracts (Post-Conditions)__event
— .NET-style Events__explicit
— Cast Operators__external
— External Library Imports__field
— Declare a non-property field__implicit
— Cast Operators__invariants
— Class Contracts (Invariants)__lock
__mapped
– Mapped Types__old
— Class Contracts (Post-Conditions)__out
—__partial
— Partial Classes__reintroduce
__result
— accessing the result of a method__require
— Class Contracts (Pre-Conditions)__using
— Using Statenents__yield
— Iterators
Deprecated Exception Handling Keywords
These keywords were defined in RemObjects Swift 8.1 for Exception Handling. With[Swift 2.0 and later now supporting error handling officially, these are being deprecated in RemObjects Swift 8.2 and beyond, and will generate errors. They will be completely removed in subsequent versions of RemObjects Swift.
Please refer to the Exception and Error Handling topic for more details on the new error handling support in Swift 2.0 and RemObjects Swift 8.2 and later.
__throw
__try
__catch
__finally
Standard Swift Keywords
These standard keywords are defined by Apple's spec for the Swift language, and are also all used by RemObjects Swift's implementation of the language:
- __consuming
- __owned
- __shared
- COLUMN
- FILE
- FUNCTION
- LINE
- _modify
- _read
- as
- assignment
- associatedtype
- associativity
- autoreleasepool
- break
- case
- catch
- class
- ConstUnsafePointer
- continue
- convenience
- default
- defer
- deinit
- didSet
- do
- dynamic
- dynamicType
- else
- enum
- extension
- fallthrough
- false
- fileprivate
- final
- for
- func
- get
- guard
- if
- higherThan
- lowerThan
- import
- in
- indirect
- infix
- init
- inout
- internal
- is
- lazy
- left
- let
- mutating
- nil
- none
- nonmutating
- open
- operator
- optional
- override
- postfix
- precedence
- precedencegroup
- prefix
- private
- protocol
- public
- repeat
- required
- rethrows
- return
- right
- safe
- self
- Self
- set
- some
- static
- strong
- struct
- subscript
- super
- switch
- throw
- throws
- true
- try
- typealias
- unowned
- unsafe
- unsafeAddress
- unsafeAddressOf
- unsafeMutableAddress
- UnsafeMutablePointer
- UnsafePointer
- var
- weak
- where
- while
- willSet