Pages

Topics

Tools

↑↓navigate↵openescclose

All syntax guides

Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.

3,965 guides across 14 topics

Topics

Latest guides

3D illustration of a tabular test matrix running cases with green check badges and benchmark stopwatches
Go

Go testing Package: Unit Tests, Table-Driven Tests, and Benchmarks

Table-driven subtests, t.Parallel ownership, benchmark timers and allocations, cleanup order, golden files, and fuzzing with property checks.

GoTestingBest Practices
3D illustration of inner struct components embedded into an outer wrapper struct with promoted methods
Go

Go Struct Embedding: Composition over Inheritance and Method Shadowing

Promotion by depth, ambiguous selectors, embedded pointers that panic, why there is no virtual dispatch, and JSON flattening that drops shadowed fields.

GoCompositionStructs
3D illustration of an any value entering a multi-way type switch scanner that routes to concrete type tracks
Go

Go Type Switches: Syntax, Type Assertions, and Empty Interface Handling

Assertion forms that panic and those that do not, multi-type cases, typed nil interfaces, pointer-receiver method sets, and errors.As for wrapped errors.

GoInterfacesType System
3D illustration of a channel queue draining data packets through a range loop until closed safely
Go

Go Channels: Closing Channels, Range over Channels, and Idiomatic Patterns

Closing as a sender's statement, buffered values delivered after close, coordinating multiple senders, and the closed channel that spins a select loop.

GoConcurrencyChannels
3D illustration of struct method calls contrasting pointer mutations against isolated copied value blocks
Go

Go Methods: Value vs Pointer Receivers, Method Sets, and Expressions

Value and pointer receivers, the method sets they produce, why map elements cannot call pointer methods, and method values that capture a copy.

GoMethodsOOP
3D illustration of Go hash map buckets allocating key-value pairs with concurrency shields and delete indicators
Go

Go Maps: Hash Map Internals, Concurrency Safety, and delete Operations

Nil map semantics, comparability rules for keys, concurrent access that kills the process, non-addressable values, and growth that never shrinks.

GoData StructuresMemory
3D illustration of structural primitive strings receiving holographic brand stamps that prevent cross-assignment
TypeScript

TypeScript Branded Types: Nominal Typing, Type Tags, and Validation

How a phantom property makes two strings incompatible, unique symbol brands, unit-typed numbers, and the places where a brand quietly disappears.

TypeScriptNominal TypingType Safety
3D illustration of generic parameter slots filling with default type blocks when no type arguments are supplied
TypeScript

TypeScript Generic Parameter Defaults: Syntax, Precedence, and Inference

When a default applies and when inference wins, defaults that reference earlier parameters, and how a defaulted type parameter keeps a library change non-breaking.

TypeScriptGenericsType Inference
3D illustration of a transparent blueprint declaration wireframe overlaying untyped JavaScript runtime machinery
TypeScript

TypeScript Ambient Declarations: .d.ts Files, declare, and declare global

How declare and .d.ts files describe runtime values, wildcard modules for assets, declare global with var, and module augmentation of third-party types.

TypeScriptDeclaration FilesTooling
3D illustration contrasting legacy namespace domes with modern modular ES import/export pipelines
TypeScript

TypeScript Namespaces vs Modules: Syntax, Declaration Merging, and Use Cases

How namespace merging works across files, why isolatedModules rejects it, and a migration path to ES modules with barrels and export * as.

TypeScriptArchitectureModules