KHOI | Blog

Learning Go — Week 1

Sat, Nov 18, 2023 · 1 min read
Blog post image

Here are a few things I found interesting about Go:

  1. Go is sort of Object-Oriented.

    • Go has no classes → no type inheritance.
    • You can define custom interfaces, custom structs (structs — data structures — can have member fields).
    • Custom types can implement 1 or more interfaces. Custom types can have member methods.
  2. There’s only one way to write a loop — the “for” loop. There is no “while…do…” or “do…while…”.

  3. Designed as a next-gen lang for C. Go borrows syntax from C, Pascal, etc.