News for hackers. Stuff that matters.
Re:Dark side of ergonomics in Rust by golergka on Saturday April 14, 2018 @02:52PM (#16838809)
Wouldn't you want, in a similar manner, a single create() call to be responsible for full initialization? An API that makes it possible to have entities half-initialzed looks like a design mistake to me. If an initialization is long and requires a lot of parameters, I personally split a "config" object that has easy access to all of them and the "real" object that swallows it in constructor or "create" call all at once.

There are no comments on this comment yet.