Causality’s expression as Space-time gave birth to all of Mathematics.
All Forgiveness Is In Action
Forgiveness in the body, heart, and mind comes from kind and good hearted actions in the form of breath, exercise and service.
(Go Lang) Functions (GBEN)
Example
- Like
C
with some type inference - Ignore the lambda expression usage, this is just so I can run the code easily in a single source block
(Go Lang) Range (GBEN)
Example
- Iterate over things and do something
(Go Lang) Maps (GBEN)
Example
- Maps are maps
- Getter returns a second result, a boolean, telling of the key was present
(Go Lang) Slices (GBEN)
Example
- Typed collections
- Similar declaraction syntax
- Bunch of associated functions
(Go Lang) Arrays (GBEN)
Example
- Like
C
declaration and index referencing and default values andlen
and multi-dimensional - declaration of, inference and assignment to
b := [5]int{1, 2, 3, 4, 5}
- Not used much because yet to be explained
slices
are better
(Go Lang) Switch (GBEN)
Example
- Like C
- switch / case / default
- Multiple comma separated conditions per case
- case on interface type
- Interface types not yet introduced
(Go Lang) If/Else (GBEN)
Example
- Just like in
C
- But with let-like bindings in declaration
- So last line would generate an error because num is out of scope
- But with let-like bindings in declaration
- No ternary
(Go Lang) For (GBEN)
Example
- Only looping construct
- Same as in
C