Programming Language Cheatsheet – Template
This page defines a standardized structure for creating concise programming language cheatsheets.
Language Overview
High-level overview with no code.
- title as
<language name> Cheatsheet - initial paragraph as a short introduction
- main characteristics of the language
- typical use cases
- primary goals (performance, safety, simplicity, etc.)
- trade‑offs of the language
- high-level list of characteristics
- category (imperative, functional, etc.)
- memory model
- type system – explicit / dynamic typing, type inference
- concurrency
- execution (compiled or interpreted)
- ecosystem tools
Project setup
- list how to create a simple project in the language
- file layout – as printed from the
treecommand - minimal code example that prints
Hello World! - show how to compile and run
Language Basics
- include all comment types – single line, multiline, documentation (module, function, etc.)
- memory model – stack or heap variables, are variables values or references, note mutability, ownership, lifetime, garbage collection
- primitive types – numbers, booleans, strings, null / undefined
- variables – declaration, basic operations
+,-,*,/,%,&&,||,&,|,^,~ - flow control – if, else, switch, match
- loops – for, while, iterators
- error handling – exceptions, result / option types, error propagation syntax
- functions, lambdas, closures
- class, enum, union, tuple, interfaces, traits – constructor, destructor, method override, overloading, inheritance
- iterators, map, filter, reduce
- generics
Expanding the project
- list and explain pitfalls for the library data structures – vector (array), set, multiset, map, multimap, stack, queue, deque, priority queue
- string – formatting, printing structures, pattern matching, regex
- how to split the project into multiple files or modules, consider visibility, importing external dependencies
- show tools for the language – compiler, interpreter, linter, formatter, repl,
Language Advanced (optional)
- standard concurrency structures
- interfacing with code base in another language
Other Resources
- official documentation
- community resources
- recommended books or tutorials