The first FORTRAN versions encoded the type of a variable or function in the initial letter of its name: I, J, K, L M and N for integer, other letters for floating-point numbers.
The first BASIC versions encoded the type of a variable or function in its suffix, no suffix for floating-point and $ for strings. Some later BASIC variants used the suffix % for integers.
The Hungarian notation was just an extension of the methods used decades earlier in languages like FORTRAN and BASIC.
Even if I started writing computer programs with FORTRAN, BASIC and COBOL, I still do not like the Hungarian notation or any other method of explicitly encoding the type of a variable in its name.
In order to use correctly a variable you need to know more than its type. If your only mistake is to use it where its type is not suitable, that will be caught immediately by the compiler. Nowadays, with any decent text editor intended for programming, clicking or hovering over an identifier will provide information about its type and possibly more than that, e.g. showing its complete definition.
The only naming restriction that I find reasonable is that used in many C/C++ programs, where variable names and function names use lower case, constant names and macro names use upper case and type names or class names use mixed case.
The first BASIC versions encoded the type of a variable or function in its suffix, no suffix for floating-point and $ for strings. Some later BASIC variants used the suffix % for integers.
The Hungarian notation was just an extension of the methods used decades earlier in languages like FORTRAN and BASIC.
Even if I started writing computer programs with FORTRAN, BASIC and COBOL, I still do not like the Hungarian notation or any other method of explicitly encoding the type of a variable in its name.
In order to use correctly a variable you need to know more than its type. If your only mistake is to use it where its type is not suitable, that will be caught immediately by the compiler. Nowadays, with any decent text editor intended for programming, clicking or hovering over an identifier will provide information about its type and possibly more than that, e.g. showing its complete definition.
The only naming restriction that I find reasonable is that used in many C/C++ programs, where variable names and function names use lower case, constant names and macro names use upper case and type names or class names use mixed case.