type Foo[T] = object
a: T
var
bar = Foo[int](a: 1) # okay
baz = Foo(a: 2) # Error: object constructor needs an object type
Generic procs already have some inference capability, why not constructors?
Because nobody ever implemented this feature. Features start in the unfortunate state "Unimplemented".
This is probably related: https://github.com/nim-lang/RFCs/issues/149
Most helpful comment
Because nobody ever implemented this feature. Features start in the unfortunate state "Unimplemented".