1.6 KiB
What is Swift?
Swift is a high-performance system programming language. It has a clean and modern syntax, offers seamless access to existing C and Objective-C code and frameworks, and is memory safe by default.
Although inspired by Objective-C and many other languages, Swift is not itself a C-derived language. As a complete and independent language, Swift packages core features like flow control, data structures, and functions, with high-level constructs like objects, protocols, closures, and generics. Swift embraces modules, eliminating the need for headers and the code duplication they entail.
To learn more about the programming language, visit swift.org.
%%LOGO%%
How to use this image
Start a REPL
Swift requires a little bit of extra security privilege to run the REPL. The following command creates an ephemeral container, attaches your terminal to it and starts the Swift REPL. A great way to try out pre-release builds!
docker run --cap-add sys_ptrace -it --rm %%IMAGE%% swift
Pull the Docker Image From Docker Hub:
docker pull %%IMAGE%%
Create a Container from the Image and Attach It:
docker run -it --name swiftfun %%IMAGE%% /bin/bash
To Start and Attach Your Image Later:
Start your image with name swiftfun
docker start swiftfun
and then attach it
docker attach swiftfun