in reply to Re: Re: Rewriting some code
in thread Rewriting some code
The author is a strong advocate of the "Hungarian" naming system, where in a strictly typed language like C or C++, the name of the variable indicates its type, such as 'nPeople' (int) or 'pszName' (char *). This is not entirely irrelevant for Perl, that while it will readily convert between int and char, it still isn't psychic. You will be punished severely if you switch up $q for $p when $q is a CGI object and $p is a SQL statement handle. Hungarian would have you call them '$cgi' and '$sth', for example, or perhaps '$cgiMain' and '$sthSelectAll'.if ($my_var = 0) { # Why doesn't this EVER run!?!? DoImportantStuff(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Rewriting some code
by sierrathedog04 (Hermit) on Feb 18, 2001 at 17:50 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |