We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
GO Quiz - Miki Tebeka
Discover the intricacies of the Go programming language in this engaging talk, covering topics such as timed scopes, floating point properties, and best practices for variable naming and channel usage.
- Always convert a timed duration to a timed scope to ensure expected behavior.
- Floating points have interesting properties, such as NaN (Not a Number) and equality checks.
- When using Unicode variable names, it’s recommended to avoid using them due to difficulty in locating the π key for other developers.
- Go supports using Unicode for variable names, but it’s not recommended.
- In Go, the string is assumed to be a single Unicode code point, and converting a rune to a string is done by simply converting the rune.
- When using pointer receivers, a different format must be used to define the function, and the receiver must be passed explicitly.
-
In Go, the
type
keyword can be used to define a type alias, and theiota
keyword can be used to automatically increment a constant value. - When working with channels, closing a channel does not guarantee that all values will be received, as values may still be in the buffer.
-
In Go,
interface{}
is a basic type that can represent any type, and an interface is considered nil only if both the type and value are nil. - The Go compiler can infer the type of a generic function, but in some cases, it may not be able to, and the developer must specify the type explicitly.
-
The
time
package in Go implements the JSON specification and can marshal times to JSON. -
The
%v
verb in Go is the default representation for a type, and the%T
verb represents the type itself.