Re:Frankenstein's `__init__`
by whatevaa on Saturday April 19, 2025 @12:36PM
(#43737493)
In C#, it is also not a good idea to have constructors with failable io in them.
[ Parent
| on HN ]
Re:Frankenstein's `__init__`
by neonsunset on Saturday April 19, 2025 @04:37PM
(#43739282)
Yup, and IO being async usually creates impedance mismatch in constructors.
Had to refactor quite a few anti-pattern constructors like this into `async Task<Thing> Create(...)` back in the day. No idea what was the thought process of the original authors, if there was any...