Skip to content
Wisdom And Wonder

Wisdom And Wonder

Equanimity Λ Computing

  • About
  • Archive
  • Privacy Policy
  • RSS

Tag: Go Lang

(Go Lang) Multiple Return Values (GBEN)

Go by Example

Example

  • They are idiomatic

Continue reading “(Go Lang) Multiple Return Values (GBEN)”

Author grantPosted on 2017-08-182021-09-01Categories ProgrammingTags GBEN, Go Lang, LanguageLeave a comment on (Go Lang) Multiple Return Values (GBEN)

(Go Lang) Functions (GBEN)

Go by Example

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

Continue reading “(Go Lang) Functions (GBEN)”

Author grantPosted on 2017-08-152021-09-01Categories ProgrammingTags GBEN, Go Lang, LanguageLeave a comment on (Go Lang) Functions (GBEN)

(Go Lang) Range (GBEN)

Go by Example

Example

  • Iterate over things and do something

Continue reading “(Go Lang) Range (GBEN)”

Author grantPosted on 2017-08-152021-09-01Categories ProgrammingTags GBEN, Go Lang, LanguageLeave a comment on (Go Lang) Range (GBEN)

(Go Lang) Maps (GBEN)

Go by Example

Example

  • Maps are maps
  • Getter returns a second result, a boolean, telling of the key was present

Continue reading “(Go Lang) Maps (GBEN)”

Author grantPosted on 2017-08-152021-09-01Categories ProgrammingTags GBEN, Go Lang, LanguageLeave a comment on (Go Lang) Maps (GBEN)

(Go Lang) Slices (GBEN)

Go by Example

Example

  • Typed collections
  • Similar declaraction syntax
  • Bunch of associated functions

Continue reading “(Go Lang) Slices (GBEN)”

Author grantPosted on 2017-08-152021-09-01Categories ProgrammingTags GBEN, Go Lang, LanguageLeave a comment on (Go Lang) Slices (GBEN)

(Go Lang) Arrays (GBEN)

Go by Example

Example

  • Like C declaration and index referencing and default values and len 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

Continue reading “(Go Lang) Arrays (GBEN)”

Author grantPosted on 2017-08-152021-09-01Categories ProgrammingTags GBEN, Go Lang, LanguageLeave a comment on (Go Lang) Arrays (GBEN)

(Go Lang) Switch (GBEN)

Go by Example

Example

  • Like C
  • switch / case / default
  • Multiple comma separated conditions per case
  • case on interface type
    • Interface types not yet introduced

Continue reading “(Go Lang) Switch (GBEN)”

Author grantPosted on 2017-08-152021-09-01Categories ProgrammingTags GBEN, Go Lang, LanguageLeave a comment on (Go Lang) Switch (GBEN)

(Go Lang) If/Else (GBEN)

Go by Example

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
  • No ternary

Continue reading “(Go Lang) If/Else (GBEN)”

Author grantPosted on 2017-08-152021-09-01Categories ProgrammingTags GBEN, Go Lang, LanguageLeave a comment on (Go Lang) If/Else (GBEN)

(Go Lang) For (GBEN)

Go by Example

Example

  • Only looping construct
  • Same as in C

Continue reading “(Go Lang) For (GBEN)”

Author grantPosted on 2017-08-152021-09-01Categories ProgrammingTags GBEN, Go Lang, LanguageLeave a comment on (Go Lang) For (GBEN)

(Go Lang) Constants (GBEN)

Go by Example

Example

  • Typical constants
  • const keyword can appear anywhere, maybe declaring a type
  • Type given by explicit cast or use in context

Continue reading “(Go Lang) Constants (GBEN)”

Author grantPosted on 2017-08-152021-09-01Categories ProgrammingTags GBEN, Go Lang, LanguageLeave a comment on (Go Lang) Constants (GBEN)

Posts pagination

Previous page Page 1 Page 2 Page 3 Next page
  • About
  • Archive
  • Privacy Policy
  • RSS
Wisdom And Wonder Privacy Policy Proudly powered by WordPress