Most people don’t know that Go has special syntax for directives. Unfortunately, it’s not real syntax, it’s just a comment. For example, //go:noinline causes the next function declaration to never get inlined, which is useful for changing the inlining cost of functions that call it.| mcyoung.xyz
String slices.| doc.rust-lang.org
Even though I am a C++ programmer at heart, Go fascinates me for none of the reasons you think. Go has made several interesting design decisions:| mcyoung.xyz
Layout of a block of memory.| doc.rust-lang.org
A dynamically-sized view into a contiguous sequence, `[T]`.| doc.rust-lang.org
A second post on Go silliness (Miguel, aren’t you a C++ programmer?): in 1.23, Go finally added custom iterators. Now, back when I was at Google and involved in the Go compiler as “the annoying Rust guy who gets lunch with us”, there were proposals suggesting adding something like this, implemented as either an interface or a func:| mcyoung.xyz
A double-ended queue implemented with a growable ring buffer.| doc.rust-lang.org
A UTF-8–encoded, growable string.| doc.rust-lang.org
A hash map implemented with quadratic probing and SIMD lookup.| doc.rust-lang.org
`Result` is a type that represents either success (`Ok`) or failure (`Err`).| doc.rust-lang.org
The `Option` type. See the module level documentation for more.| doc.rust-lang.org
A contiguous growable array type, written as `Vec`, short for ‘vector’.| doc.rust-lang.org
Overview ¶| pkg.go.dev
A pointer type that uniquely owns a heap allocation of type `T`.| doc.rust-lang.org