Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Hungarian notation

Name: Anonymous 2010-12-10 1:53

Im curious what your opinion on Hungarian notation is. It seems most C and C++ programmers dont like it, but I dont see why, it seems like a practical thing to do, especially to know which variables are pointers.

Name: Anonymous 2010-12-10 2:23

I've seen it used in weakly-typed languages, but I don't think I was at an advantage or disadvantage in those cases. In C, I'd just slap people for typedef'ing pointers. type ptrX is not as clear as type* x.

Name: Anonymous 2010-12-10 5:22

It seems practical, but in actual practice it ends up being clutter because it's not difficult to remember variable types in the chunk of code you're working on. Even if you're new to the code or forget, you need only look at the declarations.

Name: Anonymous 2010-12-10 12:41

Perl Best Practices advocates naming your references as \$\w+_ref

Name: Anonymous 2010-12-10 13:35

i += 5; /* increase i by 5 */

Name: Anonymous 2010-12-10 13:37

The solution isn't to give things weird names in the hopes that you can be reminded the type, but to have a more intelligent editor, one that will show you the type.

Name: Anonymous 2010-12-10 13:55

Would you look at that, meaningful variable names! I just name my variables _GXXX, where the XXX stands for a number that's 0 for the first variable and is auto-incremented with each subsequent one.

Name: Anonymous 2010-12-10 15:30

>>7
>meaningful variable names
>Hungarian notation
You seem to be in the wrong thread.

Name: Anonymous 2010-12-10 16:19

Hungarian notation is thought by scientific experts to be one of the most blatant systematic violations of the DRY principle possible without actually programming in Java.

Name: Anonymous 2010-12-10 19:27

Hungarian notation is good for the purpose of keeping track of arbitrary pointers, such as those of type void*.

Name: Anonymous 2010-12-10 19:32

PIGDISGUSTING

Name: Anonymous 2011-02-04 17:46

Name: Anonymous 2012-03-25 2:29

Hungarian Notation is shit.
LPTSTR lpChar; /* pointer to a null-terminated string */
LPCHAR lpsz; /* pointer to another null-terminated string */
LONG lNum; /* 32-bit signed integer */
ShitPostThreadMessage(hProg, lpChar, &lNum, NULL, NULL, &lpsz, NULL, NULL, NULL); /* post a message to the specified thread */

Name: Anonymous 2012-03-25 4:51

Win32

Don't change these.
Name: Email:
Entire Thread Thread List