Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Mixed case?

Reply
Thread Tools

Mixed case?

 
 
s0suk3@gmail.com
Guest
Posts: n/a
 
      04-30-2008
I'm totally new to C, so this is a question from a total newbie. I
know most people write the names in C with underscores,
as_in_this_name. But... is it also customary to write them in mixed
case, asWithThisName? Or is it a horrible horrible horrible thing to
do??
 
Reply With Quote
 
 
 
 
fnegroni
Guest
Posts: n/a
 
      04-30-2008
On Apr 30, 8:59*pm, s0s...@gmail.com wrote:
> I'm totally new to C, so this is a question from a total newbie. I
> know most people write the names in C with underscores,
> as_in_this_name. But... is it also customary to write them in mixed
> case, asWithThisName? Or is it a horrible horrible horrible thing to
> do??


IMHO, it is a horrible thing to do. Unless you are german...
 
Reply With Quote
 
 
 
 
John Bode
Guest
Posts: n/a
 
      04-30-2008
On Apr 30, 2:59 pm, s0s...@gmail.com wrote:
> I'm totally new to C, so this is a question from a total newbie. I
> know most people write the names in C with underscores,
> as_in_this_name. But... is it also customary to write them in mixed
> case, asWithThisName? Or is it a horrible horrible horrible thing to
> do??


There's no *technical* issue with using mixed case, and it appears to
be the more popular style where I've worked; I prefer it myself (more
natural typing than adding a bunch of underscores).
 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      04-30-2008
wrote:

> I'm totally new to C, so this is a question from a total newbie. I
> know most people write the names in C with underscores,
> as_in_this_name. But... is it also customary to write them in mixed
> case, asWithThisName? Or is it a horrible horrible horrible thing to
> do??


So-called "camel-case" isn't as traditional in C. I've seen in more
often in C++. That being said, when I worked on a major project at my
company in the mid-90s, the coding standard mandated camel-case rather
than underscores. It doesn't really matter to me in writing or reading
code which one is used. It's another case where consistency is probably
more important.



Brian
 
Reply With Quote
 
Ben Pfaff
Guest
Posts: n/a
 
      04-30-2008
writes:

> I'm totally new to C, so this is a question from a total newbie. I
> know most people write the names in C with underscores,
> as_in_this_name. But... is it also customary to write them in mixed
> case, asWithThisName? Or is it a horrible horrible horrible thing to
> do??


It's a personal preference issue. If you are working within an
existing collection of code that uses a given convention, then I
would advise sticking with that convention. If you are writing
your own code, then you can choose the convention that you
prefer.
--
"When I have to rely on inadequacy, I prefer it to be my own."
--Richard Heathfield
 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      05-01-2008
Mark McIntyre wrote:


> CamelCase seems to have come from the C++ / Microsoft world in the
> last decade or so. When I began programming, you
> justwrotewithoutspaces and if you couldn't read them you were a wuss.
> I've seen_AllSorts of lpszStupidConventions over the years tho.



Well, in the old days you kept all those identifiers nice and short. If
people couldn't figure out what adjxref meant, then they weren't paying
attention. And that was the functions. Variables rarely needed to be
over three characters in length. "num" and "len" were good enough for
the pioneers, after all.






Brian
 
Reply With Quote
 
santiago538
Guest
Posts: n/a
 
      05-01-2008
On Apr 30, 4:40 pm, Eric Sosman <Eric.Sos...@sun.com> wrote:
> - Most Of All: Do NOT!!! perpetuate that so-called
> "Hungarian notation" abomination, a reasonable idea
> that was twisted into a psychotic nightmare by weak-
> brained enthusiasts.
>


Hear hear!

My previous job required Hungarian notation for all code, not just C,
but Java as well--which is even more ridiculous as Java is strongly
typed.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mixed language programming in Visual Basic.NET Robert Liles ASP .Net 2 12-03-2009 05:47 AM
VS Authentication (mixed mode) tripwater ASP .Net 3 04-10-2005 02:51 AM
Mixed network issues =?Utf-8?B?UmFnbGU=?= Wireless Networking 6 02-07-2005 07:27 AM
VHDL verilog mixed design, strange problem Akshaye VHDL 1 02-09-2004 11:57 AM
edif and vhdl files mixed Frank VHDL 6 10-23-2003 07:54 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57