Replace Nil Checks with Nim's option[T]
Make missing values explicit at compile time using Nim’s standard library option[T] type.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Make missing values explicit at compile time using Nim’s standard library option[T] type.
Why nimble reports an unknown command for a task that exists in your .nimble manifest, with ordered checks, fixes, and escalation criteria.
Nim uses ARC for deterministic memory deallocation, but requires ORC to handle circular references that would otherwise cause memory leaks. This guide explains how to configure both strategies and avoid common pitfalls.
Use Nim's when statement to remove code before compilation based on defined flags.
Learn how to pick Nim's garbage‑collection model—Boehm GC, ARC, or manual—based on latency, determinism, and C interop, with a concrete ARC file‑closure example.
Use a Nim macro with untyped parameters to build a compile-time static-if that drops unused branches from the AST.
When counting words in Nim, <code>CountTable</code> is quick but unordered. Need deterministic order? Use <code>OrderedTable</code> or sort keys. This blog explains the trade‑offs, shows a concrete example, and gives actionable guidance.
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.