I don't think there is kwargs in Nim. It may be possible to implement similar things with macros. You can also just do import std/tables proc foo(a: int, b: string, kwds: seq[(string, string)] = @[]) = let kwdTable = kwds.toTable echo kwds, kwdTable foo(1, "bar") foo(2, "baz", @{"kwarg1": "value1"}) Run
Nim is a static typed language and functions must have certain parameters known at compile time. (btw, in Nim it is relatively hard to do dynamic types, compared to modern C++ `std::any`, Go `interface{}` and Rust `std::Any`, Nim doesn't have such things widely used or in standard lib) Disclaimer: I am not very familiar with Nim, so maybe I am wrong.