Canonical guidance

Use when

Avoid

Preferred pattern

head := s[:n:n]

Anti-pattern

Explanation: This is tempting because slice syntax is lightweight, but the aliasing and capacity semantics still matter.

Why

Related pages

Sources