NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 23 24 25 26 27 … 93 Next »
Brace for it

 
  • 0 Vote(s) - 0 Average
Brace for it
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#1
2009-08-27, 11:37 PM
I was just wondering if I am the only one that still likes K&R style code, it just seems so much more natural for me to type

Code:
if (condition) {
    // some code
} else {
   // some more code
}

over the MS default for C#. I know I can change this but what do others do?

Also do you any of you use a tool like indent, astyle or StyleCop http://blogs.msdn.com/sourceanalysis/ to enforce a standard?

Martin
fla
Offline

Posting Freak

Posts: 876
Threads: 45
Joined: Mar 2006
#2
2009-08-28, 12:05 AM
I've always preferred having the opening and closing braces line up vertically even when screens were text mode 80x25 and lines were precious. That said, when editing code, I always continue with the style the original author used.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#3
2009-08-28, 12:47 AM
I used to prefer the old K&R style, but years of C++/Java/C# projects that have used the braces in-line vertically have changed my preference. I know find the K&R style a little hard to read.
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#4
2009-08-28, 09:08 AM
sub Wrote:I know find the K&R style a little hard to read.


How do you survive as a programmer when your spelling is so atrocious ?? Big GrinBig GrinBig Grin
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#5
2009-08-28, 09:21 AM
programming doesn't require spelling correctly - or grammar for that matter Big GrinBig Grin

Why do you think programmers use i and x as variable names?
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#6
2009-08-28, 02:02 PM
psycik Wrote:Why do you think programmers use i and x as variable names?

It's these general, but wordy languages that get me. Some of the Windows entry point names fill a whole line - what do you do, write with short names and do a search and replace to fill it out or have a short named internal routine that just goes to the external one?
InVermont
Offline

Member

Posts: 157
Threads: 10
Joined: Mar 2007
#7
2009-08-28, 03:20 PM
martint123 Wrote:It's these general, but wordy languages that get me. Some of the Windows entry point names fill a whole line - what do you do, write with short names and do a search and replace to fill it out or have a short named internal routine that just goes to the external one?

I just let IntelliSense fill it in for me.

I prefer K&R style myself, but I'm not religious about it.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#8
2009-08-28, 05:13 PM
martint123 Wrote:How do you survive as a programmer when your spelling is so atrocious ?? Big GrinBig GrinBig Grin
Believe it or not, my spelling isnt too bad usually, but some times when I'm typing fast (and not concentrating) all that goes out the window. I'm also prone to missing words entirely when I'm typing.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode