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

Modular type blocks locking into constrained keyof slots with glowing alignment lines
TypeScript

TypeScript Generics: Type Constraints, extends Keyof, and Default Types

What T extends really constrains, how K extends keyof T keeps a return type tied to the key you pass, defaults on type parameters, and where NoInfer stops a second argument from widening inference.

TypeScriptGenericsType System
Union type values funneled through type guard gates into separate Admin, Guest, and null streams
TypeScript

TypeScript Type Narrowing: Type Guards, in Operator, and Discriminated Unions

Every guard TypeScript uses to narrow a union, what each one removes, and the three failures that keep narrowing from applying: typeof null, widened discriminants, and closures over mutable bindings.

TypeScriptType SystemWeb Development
Go gopher data pipelines streaming packets into synchronized channel hubs with select switches
Go

Go Goroutines and Channels: Concurrency Patterns, Buffered Channels, and select

Go concurrency from the channel up: what an unbuffered send waits for, how select chooses, why goroutines leak, and the worker pool, timeout, and fan-in patterns that prevent it.

GoConcurrencyBackend
Modular TypeScript type blocks being picked, omitted, and assembled into a Record
TypeScript

TypeScript Utility Types: Pick, Omit, Partial, and Record Explained

How Pick, Omit, Partial, and Record are built from mapped types: what each preserves, why Omit accepts a typo, how Partial distributes over unions, and the errors each raises.

TypeScriptGenericsUtility Types
TypeScript satisfies operator validating a config object against a type while keeping literal types
TypeScript

TypeScript satisfies Operator: Syntax, vs Type Annotations, and as const

How the TypeScript 4.9 satisfies operator validates an expression without widening its inferred type, why per-property types survive, and how as const changes the result.

TypeScriptType SystemWeb Development
C# collection brackets combining arrays through spread elements into one collection
C#

C# 12 Collection Expressions: Syntax, Spread Operator, and Performance

How C# 12 collection expressions convert to arrays, spans, lists, and builder-backed types, and where the spread element and target-type rules decide performance.

C#Collection ExpressionsC# 12Spread Operator
Java record block deconstructing into name, age, email, and admin components
Java

Java Record Patterns: Deconstruction, Nested Records, and switch Syntax

How Java 21 record patterns deconstruct record values, how nested patterns compose, and how guards, ordering, and exhaustiveness decide whether a pattern switch compiles.

JavaRecord PatternsPattern MatchingJava 21
Python 3.12 generic class Box with T and U type parameter slots
Python

Python 3.12 Generics: PEP 695 Syntax, Type Parameters, and TypeVar

How Python 3.12 PEP 695 type parameter syntax works: bracket declarations for classes, functions, and type aliases, bounds and constraints, inferred variance, lazy evaluation, and the runtime scope rules.

PythonGenericsType HintsPEP 695
C# primary constructor parameters captured into a glowing class container
C#

C# Primary Constructors: Syntax, Scope, and Pitfalls

How C# 12 primary constructors work on classes and structs, what the compiler generates, and the property, capture, and validation pitfalls that surprise teams.

C#Primary ConstructorsC# 12Records
Java 21 virtual threads streaming into a carrier pipe beside platform thread workers
Java

Java 21 Virtual Threads: Syntax, Thread Pools, and Concurrency

How Java 21 virtual threads are created and scheduled, why they must never be pooled, and the pinning, ThreadLocal, and resource-limit problems that decide whether they help.

JavaVirtual ThreadsConcurrencyJava 21