Nim Distinct Types: Turning Unit Mix-Ups into Compiler Errors
Nim distinct types make passing meters where feet are expected a compile-time error. See a worked example, the boundary friction, and how to roll it out safely.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Nim distinct types make passing meters where feet are expected a compile-time error. See a worked example, the boundary friction, and how to roll it out safely.
Switching Nim from mark-and-sweep to ARC or ORC removes stop-the-world pauses but introduces new ownership rules. Learn how to choose the right --mm flag and avoid circular reference leaks.
A decision guide that compares Nim's GC, ARC, ORC, and manual memory modes, shows trade‑offs, and gives a concrete compile‑and‑measure workflow.
A practical guide to choosing between ARC and ORCP in Nim, covering memory boundaries, atomic overhead, and failure modes for high-performance systems.
Nim 2.0's ARC/ORC memory management gives you deterministic deallocation without GC pauses. This blog covers ownership semantics, cycle collection, migration friction, and a worked cyclic-list example—plus the trade-offs you'll hit in production.
Learn how to diagnose and fix memory leaks and reference cycles in Nim using ARC and ORC. This guide covers --debug:memleak, ownership annotations, and breaking cycles with {.weak.}.
Nim's ORC memory management mode provides deterministic destruction for latency-sensitive CLI tools by using reference counting instead of tracing GC, but requires careful ownership design to avoid leaks.
Nim's Optimized Reference Counting (ORC) delivers deterministic destruction without a garbage collector, making it suitable for embedded, real‑time, and WASM targets. This post walks through how ORC works, a cyclic data‑structure example, and the trade‑offs you must accept.
Nim offers deterministic ARC/ORC memory modes that eliminate unpredictable GC pauses, making them ideal for real‑time and embedded workloads.