Date: Tue, 23 Jan 2001 09:44:37 -0600 From: "G. Adam Stanislav" <adam@whizkidtech.net> To: Tony Finch <dot@dotat.at> Cc: j mckitrick <jcm@FreeBSD-uk.eu.org>, freebsd-chat@FreeBSD.ORG Subject: Re: silly C style question Message-ID: <3.0.6.32.20010123094437.009dc5d0@mail85.pair.com> In-Reply-To: <20010123142733.S92905@hand.dotat.at> References: <3.0.6.32.20010122131649.009c9730@mail85.pair.com> <20010122170600.D4456@dogma.freebsd-uk.eu.org> <3.0.6.32.20010122131649.009c9730@mail85.pair.com>
next in thread | previous in thread | raw e-mail | index | archive | help
At 14:27 23-01-2001 +0000, Tony Finch wrote: >"G. Adam Stanislav" <adam@whizkidtech.net> wrote: >> >>But the whole point of C style is that you develop your own. Not every >>painter is a cubist, some are dadaists (and most are neither). That does >>not make them better--or worse--just different. > >I've hacked on too many other people's code to have my own layout >style (although I currently gravitate to BSD style since that's the >code I look at the most). However, when it comes to variable naming >I'm Unix all the way and *shun* anything that's StUdLy or smells of >Hungarian. > >Tony. Well, I don't care for H. notation too much either. I code for both, Unix and the other thing, but have always used Unix style var names. The only thing I do differently is when I write a library of routines in assembly language. For routines that are C-callable I use Unix style var names, for those that are not I use dotted names, such as var.name - this to make sure I do not accidently call them from C. Either way, I always prefer everything in lower case. That way I do not have to remember the capitalization, and save myself from having to use the shift key. I really hate the way Windows variables come out, especially when programming in assembly language, since I end up typing such weird names as __imp__VarName@8 - really ugly. Thank goodness for macros, so I don't have to type it that way all through the code! I have to admit that nationalism plays some part in this, too: I grew up in Slovakia, and, for various historical reasons, Slovaks and Hungarians do not always like each other. On second thought, I have overcome such ethnic tensions by living in the US: I just don't care for H. notation for ergonomic reasons (shift key and such). Besides, I don't like to be constrained: I often treat the contents of a variable as a character in one place, as an integer in another, or even as an 8-bit quantity in one place, as a 16-bit quantity in another, as a 32-bit quantity in yet another. To me it's all just binary data. I certainly hope I know what I'm doing <:)>, so why should I need a prefix to remind me of the type of each variable. I do comment my code extensively, so Hungarian notation just gets in the way instead of helping out. Cheers, Adam --- Whiz Kid Technomagic - brand name computers for less. See http://www.whizkidtech.net/pcwarehouse/ for details. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.6.32.20010123094437.009dc5d0>