2 ms·
>Hungarian notation, to me at least, finds most of its usage in a particularly painful "middle" of the strongly typed language spectrum where the language is st
by hackinthebochs 10y ago
>Hungarian notation, to me at least, finds most of its usage in a particularly painful "middle" of the strongly typed language spectrum where the language is strongly typed enough that subtle type differences are surprising footguns
I agree, but I think this has less to do with the type system and more do to with the immaturity of our API design ethos at the time. Certainly the weak static typing of C++ lead to lots of booby traps, and I agree that tooling should be able to mitigate the need for hungarian notation for this case. So for this aspect, the type system is central to the issue.
But I see the power of hungarian notation in reading code and reasoning about how different pieces fit together. For languages like C/C++, owing to the conventions at the time and the relatively anemic facilities for abstraction, lower and higher level abstractions were often mixed together which made keeping the implementation details at the forefront a necessity. Having the type information carried along with a variable made this process a lot easier. Hungarian notation isn't needed anymore in modern languages (or even modern C++) because we've become so much better at following good design principles and our languages are much more powerful tools for abstraction.