Swift Keywords

In this tutorial you will learn about the Swift Keywords and its application with practical example.

Swift Keywords

In Swift, there are is a set of reserved words that you cannot use as an identifier. These words are known as “reserved words” or “Keywords”. Keywords are standard identifiers and their functions is predefined by the compiler. We cannot use keywords as variable names, class names, or method names, or as any other identifier.

Following is a Swift Keyword Table –

Class deinit Enum extension Func import Init
operator private protocol public static struct subscript
break case continue default do else for
return switch where while as false is
dynamicType super true _COLUMN_ Let in _FILE_
internal typealias if nil var self unowned
_FUNCTION_ _LINE_ associativity convenience dynamic didSet precedence
final get infix inout right set type
lazy left mutating none weak willSet prefix
nonmutating optional override postfix Protocol required
In this tutorial we have learn about the Swift Keywords and its application with practical example. I hope you will like this tutorial.