type Cat = object
proc purr(this: Cat) = echo "Purr"
Cat().purr()
purr() is glued to the Cat, statically, for all Cats.
Cat().purr()
Cat() does allocate an anonymous object for each call -- at least it did in the past.
You may also consider type or typedesc as first parameter, see as an example
https://forum.nim-lang.org/t/5331
So we can call a proc on a type like
let dobby = User.create_admin()