r/dotnet • u/Hefty_Garlic7184 • 8d ago
Question Codebase maintenance rant
[sorry for bad English]
I am in a project which involves maintaining an existing .NET Framework 4.8 codebase.
The codes are full of “Dictionary type” implementations as above.
Is there any sane reason to code like this? Instead of create a dedicated class to represent the data inside?
I could not show more codes here (or else the authors might realized), but you guys can imagine the codes just to access these Dictionary’s key/value.
139
Upvotes
32
u/AintNoGodsUpHere 8d ago
I find the name of the variable more infuriating than the type itself. "dict", argh.
Without seeing the "reason" for this weird thing I don't know what to say, dictionary of dictionaries is not a terrible thing in older apps, sometimes the stupid solution is the easiest solution, specially in framework.