Hacker News new | ask | show | jobs
by agnsaft 3433 days ago
Its really great, but some of the APIs could have been re-designed slightly when they "rebooted" the framework... e.g. getting rid of factory patterns when strictly not needed and such for added consistency.
1 comments

Can I see an example? I get shifty when I see people saying things like 'factory pattern not strictly needed'. For example, there are moments where an API may need you to construct an object with a certain set of 'default properties'. I believe that rather than making developers generate 'boilerplate' there should just be some kind of 'boilerplate' factory.

So, these boilerplate factories are not strictly necessary but they make the API user's code simpler, more comprehensible, isolate responsibilities, etc.

Read the .net framework standard library annotated reference for some commentary by the original framework devs to understand what they would have changed.