From owner-freebsd-chat Tue Jan 23 7:44:37 2001 Delivered-To: freebsd-chat@freebsd.org Received: from mail.bfm.org (mail.bfm.org [216.127.218.26]) by hub.freebsd.org (Postfix) with ESMTP id 1732C37B69B for ; Tue, 23 Jan 2001 07:44:19 -0800 (PST) Received: from WhizKid (r41.bfm.org [216.127.220.137]) by mail.bfm.org (Post.Office MTA v3.5.3 release 223 ID# 0-52399U2500L250S0V35) with SMTP id org; Tue, 23 Jan 2001 09:46:20 -0600 Message-Id: <3.0.6.32.20010123094437.009dc5d0@mail85.pair.com> X-Sender: whizkid@mail85.pair.com X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Tue, 23 Jan 2001 09:44:37 -0600 To: Tony Finch From: "G. Adam Stanislav" Subject: Re: silly C style question Cc: j mckitrick , freebsd-chat@FreeBSD.ORG 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At 14:27 23-01-2001 +0000, Tony Finch wrote: >"G. Adam Stanislav" 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