Choose TypeScript, Go, Rust or C++ and find syntax, everyday APIs, standard libraries and tools in one place.
Scope and conventions
TypeScript/Node, Go 1.23+, Rust 2024 and C++23: from a first CLI to files, JSON, HTTP, concurrency and testing. Complete programs are labeled; other examples identify their surrounding code/imports. Optional libraries and version requirements are named in each entry.
No comparison
Compare with TypeScript
Compare with Go
Compare with C++
Patterns & regex
TypeScript uses JavaScript RegExp; Go uses regexp; Rust uses the optional regex crate; C++ uses std::regex with its default ECMAScript grammar. Pattern rows show regex text; API rows show host-language escaping.
A greedy quantifier prefers more input when a match is possible. Appending ? makes it prefer less. Lazy repetition is not a substitute for choosing a correct grammar.
| separates alternatives; group them when only part of a pattern should vary. Default alternatives are tried in order, under each engine’s matching policy.
^ and $ are boundary assertions, not matched characters. Their line behavior depends on multiline flags. Use the engine’s full-match contract when validating an entire input.
Fragment
src/main.rs
Follow appearance
✓GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
^name$# Confirm multiline/end-boundary behavior for the named engine.
A pattern such as a* can match without consuming input. Use a documented iterator API rather than writing a loop that retries the same empty match forever.
The regex crate gives O(m×n) search bounds in pattern-size m and haystack-size n. Iterating all matches can have larger worst-case costs; bound inputs and result retention.
Regex is useful for bounded token recognition and extraction. JSON, CSV, HTML and nested-language parsing need their format rules, escaping and error handling.
Fragment
src/main.rs
Follow appearance
✓GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
CSV: a quoted field can contain a comma or newlineJSON: strings can contain escaped delimiters
Unicode normalization and case policies can change which strings are considered equivalent. Normalize only under an explicit domain contract; matching alone does not establish semantic identity.
Fragment
src/main.rs
Follow appearance
✓GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
NFC/NFD: canonical normalization formsCase folding: a separate language/Unicode policy