Mixed case?

Discussion in 'C Programming' started by s0suk3@gmail.com, Apr 30, 2008.

  1. Guest

    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??
     
    , Apr 30, 2008
    #1
    1. Advertising

  2. fnegroni Guest

    On Apr 30, 8:59 pm, 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... ;-)
     
    fnegroni, Apr 30, 2008
    #2
    1. Advertising

  3. John Bode Guest

    On Apr 30, 2:59 pm, 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).
     
    John Bode, Apr 30, 2008
    #3
  4. Default User Guest

    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
     
    Default User, Apr 30, 2008
    #4
  5. Ben Pfaff Guest

    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
     
    Ben Pfaff, Apr 30, 2008
    #5
  6. Default User Guest

    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
     
    Default User, May 1, 2008
    #6
  7. santiago538 Guest

    On Apr 30, 4:40 pm, Eric Sosman <> 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.
     
    santiago538, May 1, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Franks
    Replies:
    2
    Views:
    1,261
    Steve Franks
    Jun 10, 2004
  2. Tee
    Replies:
    3
    Views:
    7,830
    Herfried K. Wagner [MVP]
    Jun 23, 2004
  3. James Harris
    Replies:
    46
    Views:
    1,045
    Ronald Landheer-Cieslak
    Jul 23, 2004
  4. Michael Mair
    Replies:
    1
    Views:
    413
    S.Tobias
    Jun 14, 2005
  5. Michael Friendly

    translating code to 'mixed' case

    Michael Friendly, Sep 22, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    105
    Anno Siegel
    Sep 23, 2004
Loading...

Share This Page