October 2016
Beginner
348 pages
6h 31m
English
Staying true to its simplistic nature, operators in Go do exactly what you would expect, mainly, they allow operands to be combined into expressions. There are no hidden surprise behaviors with Go operators as there is no support for operator-overloading as found in C++ or Scala. This was a deliberate decision from the designers to keep the semantics of the language simple and predictable.
This section explores the most common operators that you will encounter as you start with Go. Other operators are covered throughout other chapters of the book.
The following table summarizes the arithmetic operators supported in Go.
|
Operator |
Operation |
Compatible types |
|
|
Multiplication, division, and subtraction |
Integers, ... |
Read now
Unlock full access