3 ms·
You can flip it around and ask why have names at all? What is the point of a name? Why not just have randomString() choose your names? The name is an important
by gfodor 13y ago
You can flip it around and ask why have names at all? What is the point of a name? Why not just have randomString() choose your names? The name is an important dimension that is provided by a programming language to describe some piece of information. Hungarian is a way of leveraging this dimension, which is separate from the type system, that is optimized for efficiency at the cost of intuitivity.
Also, many of the examples I gave above have little relevance to enforcing constraints on the use of data, which is the job of the type system, but are still relevant to the programmer in helping them understand and properly work on the code.
- noblethrasher 13y agoAmong the things that names/identifiers do: (1) They act as indexes or discriminators. (2) They describe. (3) They prescribe. (1) will be useful for at least as long as we program in a textual medium. (2) is also useful, but type systems make it ancillary. (3) is dangerous since it's merely an ought statement that can easily get divorced from reality; decent type systems obviate the need for that role.
- gfodor 13y agoYou're completely ignoring the role and importance of notation. Type systems do not take on the role of efficiently conveying information to a reader visually through symbology, which is part of the role of notation. Types in a type system have names, after all, and the choice of those names is also one of notation. Good notation comes largely in part from good names and has little to do with type systems. Hungarian is an exercise in notation, hence the name.