Author Topic: Programming Megathread  (Read 143264 times)

Also supporting braces on individual lines. It sets a good, consistent standard for indentation.
idk how that has anything to do with indentation... certainly don't understand how the alternative could be any worse as far as that goes

Putting opening braces on their own lines is tantamount to worshiping satan. You guys should be ashamed of yourselves.

i prefer braces in their own Special Place because that's what i'm used to and it just looks right to me. it's harder for me to follow code that has opening braces on the same line

Wow, sorry about that. I've never seen anyone purposely put braces on the next line!

I've never seen anyone purposely put braces on the next line!
It's in every programming book, tutorial, course and friend's code I look at. Hell, Harvard use it in CS50, and I've looked at AAA game code which used the standard brace style.

Idk why you wouldn't have them on individual lines. It looks so much neater and its easier to find stuff.

The brackets on a new line is at least part of the style used in K&R, although even within that it varies.

That said I find code that doesn't have opening braces of functions and control statements on the same line and the closing brace at the same indentation to be much harder to read and understand. I feel like having the brackets on their own line is a waste of white space and needlessly spreads code off screen.

Wow, sorry about that. I've never seen anyone purposely put braces on the next line!
I see it a ton in blockland code. I don't like it at all, myself. it makes it look like it's a separate thing from the statement above, to me

It's in every programming book, tutorial, course and friend's code I look at. Hell, Harvard use it in CS50, and I've looked at AAA game code which used the standard brace style.

Jeez, looks like I've been living in the secluded part of programming lmao

Wow, sorry about that. I've never seen anyone purposely put braces on the next line!
It looks fine as long as the indention is kept, if they are not indented properly it looks absolutely horrific

It looks fine as long as the indention is kept, if they are not indented properly it looks absolutely horrific
Oh, you mean like this?:

Code: [Select]
while (true) {
//bluhbluh
//bluhbluh
}

I would agree.


You know Ravencroft, this isn't the, "Do My Homework For Me," megathread. The majority of your problems have been syntax errors or simple errors on boundary conditions. It makes me question whether you've even been investigating the issue before asking for help.

You know Ravencroft, this isn't the, "Do My Homework For Me," megathread. The majority of your problems have been syntax errors or simple errors on boundary conditions. It makes me question whether you've even been investigating the issue before asking for help.
Sorry you feel that way!

Visualstudio doesn't support reading and writing datafiles apparently. Had to use Devcpp.