Nim doesn't have C++ like constructors. Defining procedures like `createFoo` or `initBar` is the popular Nim way. <https://internet-of-tomohiro.pages.dev/nim/faq.ja#procedures-how-to-define-constructorsqmark>
It is much simpler than C++'s constructors that have many complex features and rules: <https://en.cppreference.com/w/cpp/language/constructor> But Nim ways works fine. I also came from C++ before using Nim but I don't think Nim needs C++ like constructors.