Characters, symbols terminology
You will find my »personal » list definition of characters and symbols terminology used in Swift.
When your first speaking language is not english and that those termes are mention in tutorial, Having the word terminology help to understand. Let me know if I have to make some changes.
Note: Caracters could be different with your browser dictionary if it’s not in English. (ex.: Quotation mark)
Notation
[ ]
()
{}
Square Brackets (Left bracket, Right bracket)
Parentheses (Left, Right)
Brase / Curly Brases / Curly Brackets / Closure
:
;
Colon
Semicolon
Ariyhmetic Operators
+
–
*
/
Plus sign (Addition)
Minus (Soustraction)
Asterisk (Multiplication)
Divider (Division)
=
Equal sign
!
?
%
$
#
Exclamation Mark
Question Mark
Percent sign
Dollar sign
Number sign
Optional
reminder … Modulus (What is left with a hole value)
&
|
Ampersand
Vertical bar, Pipe line
‘ ‘
‘
.
,
Quotation mark
Apostrophe
Period
Comma
/
\
_
->
Slash
Backslash
Underscore
Arrow
Ignore metadata
returning something
Comparaison Operators
==
===
!=
>
<
>=
=<
Is Equal to
Is not equal to (N’est pas égale)
Greater Than (Angle Bracket)
Less Than (Angle Bracket)
Greater team or Equal to
Les than or Equal to
Compound Assignment Operators
+=
-=
*=
/=
Plus Equal
Less Equal
Multiple Equal
Devided Equal
Logical Operators
&&
And
The answer must be True or False for booth
True True / False False (Boolean)
||
Or
The answer must be true for one or the other
True False / False True (Boolean)
!
Not
logical not … inverts a Boolean
We also use it for a : Force on wrap
?
??
Optional
Nil Coalescing
Let us protect are code from default errors.
ex.: let minutes = components.minutes ?? 0 (equal zero)
Ponctuation
camelCase / Writing convention
let name
let nameAdress
struct Album
100 000 can be wrote 100_000
with lowercase
with lowercase first word & uppercase with the second word
always used with uppercase
booth are accepted
Mute lines of code
//
/* … */
‘ ‘ ‘ ‘ ‘ ‘ … ‘ ‘ ‘ ‘ ‘ ‘
\’ ‘
\
_
One line comment
More than 2 lines of comments
Bloc of lignes (3 Quotation mark … the code … 3 Quotation mark)
Mettre des guillemets dans une string
Strings interpolation
Underscore (define whatever in … ce qui est à l’intérieur)
nil – optionals
Void
Null
nil
()
?
Means: Nothing or Nothing at all
Empty – Meaning that it’s empty
exemple: var multiples = [Int] ()
Quand il n’y a pas de valeur cela retourne »nil »
ex.: init?() try? as?
Means in Swift
[ … c … ]
<>
not case sensitive