A repository for showcasing my knowledge of the Swift programming language, and continuing to learn the language.

Last update: Nov 27, 2021

/SwiftLogo.jpeg

Learning Swift (programming language)

I know very little about programming in the Swift programming language. This document will go over all my knowledge of the Swift programming language.

Hello World in Swift

Writing a Hello World program in Swift is a lot more difficult than it should be.

NSString *str = @"hello,";
str = [str stringByAppendingString:@" world"];

It can also be written like this:

var str = "hello,"
str += " world"

or possibly like this:

NSString "Hello World";

/!\ This example has not been tested yet, and may not work

Comments in Swift

Comments in Swift are identical to comments in Java, JavaScript, C, CSS, Google Go, C++, etc..

// This is a single line comment
/* This
is a multiline
comment */
/* Multi-line comments
* can also
* be written
* like this */

Break keyword in Swift

break;

To this day, I am still not entirely sure what the break keyword does, but most languages support it.

/!\ This example has not been tested yet, and may not work

Integers in Swift

Swift uses the let keyword to set a variable/integer/string in the language. This is an example of getting integers to work.

let x = int(2);
let y = int(16);
return x ** y;

/!\ This example has not been tested yet, and may not work

Other knowledge of the Swift programming language

  1. Swift is a language developed by Apple Inc.

  2. Swift is a default language on modern MacOS, iOS, iPadOS, WatchOS, and tvOS, but is also supported on Linux and Windows

  3. Swift is a curly bracket and semicolon language

  4. Swift uses the *.swift file extension

  5. Swift is an open source language

  6. No other knowledge of the Swift programming language


GitHub

https://github.com/seanpm2001/Learn-Swift
You might also like...

A functional tool-belt for Swift Language similar to Lo-Dash or Underscore.js in Javascript

Dollar Dollar is a Swift library that provides useful functional programming helper methods without extending any built in objects. It is similar to L

Jun 21, 2022

Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer documentation.

Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer docum

Jun 22, 2022

BCSwiftTor - Opinionated pure Swift controller for Tor, including full support for Swift 5.5 and Swift Concurrency

BCSwiftTor Opinionated pure Swift controller for Tor, including full support for

May 20, 2022

Zip - A Swift framework for zipping and unzipping files. Simple and quick to use. Built on top of minizip.

 Zip - A Swift framework for zipping and unzipping files. Simple and quick to use. Built on top of minizip.

Zip A Swift framework for zipping and unzipping files. Simple and quick to use. Built on top of minizip. Usage Import Zip at the top of the Swift file

Jun 17, 2022

Useful Swift code samples, extensions, functionalities and scripts to cherry-pick and use in your projects

SwiftyPick 🦅 🍒 Useful Swift code samples, extensions, functionalities and scripts to cherry-pick and use in your projects. Purpose The idea behind t

May 12, 2022

A handy collection of Swift method and Tools to build project faster and more efficient.

SwifterKnife is a collection of Swift extension method and some tools that often use in develop project, with them you might build project faster and

Mar 11, 2022

TypeStyle is a handy app for iPhone and iPad that generates text using different styles and decorations. It is a native Swift iOS app.

TypeStyle is a handy app for iPhone and iPad that generates text using different styles and decorations. It is a native Swift iOS app.

TypeStyle TypeStyle is a handy app for iPhone and iPad that generates text using different styles and decorations. It is a native Swift iOS app. Featu

Feb 12, 2022

Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures

Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures

Async+ for Swift provides a simple chainable interface for your async and throwing code, similar to promises and futures. Have the best of both worlds

Jun 18, 2022

A lightweight extension to Swift's CollectionDifference, supporting moves in addition to removals and insertions, critical when updating interfaces and managing reference types.

DifferenceTracker is a lightweight extension to Swift's CollectionDifference. It defines moves in addition to removals and insertions, critical when updating interfaces and managing reference types.

Jun 7, 2022
Numerals is a package containing additional numeric types for the Swift programming language.

swift-numerals Numerals is a package containing additional numeric types for the Swift programming language. Contents The package currently provides t

Jun 12, 2022
A parser combinator library written in the Swift programming language.

SwiftParsec SwiftParsec is a Swift port of the Parsec parser combinator library. It allows the creation of sophisticated parsers from a set of simple

May 22, 2022
A Cocoa library to extend the Objective-C programming language.

The Extended Objective-C library extends the dynamism of the Objective-C programming language to support additional patterns present in other programm

Jun 16, 2022
IOS-Bootcamp-Examples - Learn to Swift while building apps - With IOS Development Bootcamp
IOS-Bootcamp-Examples - Learn to Swift while building apps - With IOS Development Bootcamp

IOS-Bootcamp-Examples Learn to Swift while building apps - With IOS Development

Apr 3, 2022
Cross-Platform, Protocol-Oriented Programming base library to complement the Swift Standard Library. (Pure Swift, Supports Linux)

SwiftFoundation Cross-Platform, Protocol-Oriented Programming base library to complement the Swift Standard Library. Goals Provide a cross-platform in

Jun 10, 2022
Pure Declarative Programming in Swift, Among Other Things

Basis The Basis is an exploration of pure declarative programming and reasoning in Swift. It by no means contains idiomatic code, but is instead inten

Jun 20, 2022
🏹 Bow is a cross-platform library for Typed Functional Programming in Swift
🏹 Bow is a cross-platform library for Typed Functional Programming in Swift

Bow is a cross-platform library for Typed Functional Programming in Swift. Documentation All documentation and API reference is published in our websi

Jun 22, 2022
Functional programming in Swift

Swiftz Swiftz is a Swift library for functional programming. It defines functional data structures, functions, idioms, and extensions that augment the

Jun 22, 2022
Shared repository for architecture and other iOS helpers.

ArchKit A shared package for all the infrastructure required to support the Architecture styles I use in my own apps. Very shortly, this architecture

Jan 8, 2022