In this first section, we'll look at the basic language syntax for Swift, and you'll write your first fully functional Swift program.

Like many modern programming languages, Swift draws its most basic syntax from the programming language C. If you have previous programming experience in other C-inspired languages, such as C++, Java, C#, Objective-C, or PHP, many aspects of Swift will seem familiar, and many Swift concepts you will probably find quite familiar.

We can say the following about Swift's basic syntax:

If you have prior experience in other C-inspired languages, such as Java, C#, or C++, Swift has some improvements and differences that will take some time and practice for you to become accustomed to:

For those coming to Swift from Java, C++, C#, and similar languages, your previous experience with other C-inspired languages will help accelerate your progress learning Swift. However, be sure to study the language syntax carefully and be on the lookout for subtle differences.

When learning a new language, it's traditional for a first program to make sure the development environment is installed and properly configured by writing a program that outputs something to the screen. That's what we'll do next.

Now, let's use an Xcode playground to create a simple Swift program to display the string Hello, World to the playground console, by following these steps:

Congratulations! You've just written your first Swift program. If you see the text Hello, World. output in the bottom pane of the playground window, your program has worked.

Before we move on, let's look at the structure of the playground window:

Hello, World!

Note the following regions in the playground window, as indicated by the numbers within the red circles:

Now that we have a development environment up and running where we can create and run Swift code, let's move on to learning about and using the Swift language.