Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
Simran-B
· 1y ago · 0 comments
You can simply offer a function to create an object using positional arguments if you want that
Comments
[–]
hansvm
1y ago
You can also create a function capable of doing that for any object, or one which curries the type parameter, if you'd like to reduce the boilerplate if you have many types of objects you'd like to instantiate positionally.