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.
Nim 2.0 defaults to ORC for deterministic memory management without a tracing GC. Learn how ARC and ORC work, when to choose each mode, and what trade-offs to expect.
Learn how Nimble’s lockfile guarantees deterministic builds, keeps dependency versions stable, and speeds up CI pipelines. Follow the practical example, trade‑offs, and verification steps to adopt lockfiles in your Nim projects.
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.