Followers 0

# My OLD Syntax

## 80 posts in this topic

0

##### Share on other sites

That's funny.  I consider that a great style.  Also this is the style at Microsoft, and Epic.

I only switched to having the opening curly brace on the same line because I wanted to be consistent with others on a team I was on.  Overall I think putting it on the next line is the most flexible and doesn't require weird special cases like when you start indenting the parameters list.

0

##### Share on other sites

Once I saw a random poll on a blog that had almost 2000 votes, it had like 10 different styles listed, Allman style was winning by 70% or so.

Edited by TheChubu
1

##### Share on other sites

Reading the comments there reminds me of people who said that if you aren't using camel case you're actively boycotting other programmers by making identifiers less readable... I actually find all lowercase to be more readable than camel case (although if you use all lowercase then you must use underscores, otherwise yes, it's an unreadable mess).

Which reminds me, with my current style things go like this:

• Identifiers: lowercase
• Custom types: camel case
• Constants: uppercase

How would it be with camel case for identifiers? Like this? (going by the Windows API, which does exactly this)

• Identifiers: camel case
• Custom types: uppercase
• Constants: uppercase

Yeah, not hard to see the issue there, constants and types look the same under that convention. Sure, somebody will argue that smart syntax highlighting should take care of that, but you don't always have that available, and you shouldn't rely on it being available either, especially if you're going to be sharing the code (and you should program like you will!).

0

##### Share on other sites

Using python syntax on C++ project is a nice thing to experience, specially to get cool state machines.

We need to add --ignore--brackets option to GCC, enabled on default settings in the next release (as usual).

0

##### Share on other sites

Well when I'm too lazy to make my code look nice I just press CTRL + SHIFT + F in eclipse and it automatically formats my code. Try it if you use eclipse I.D.E.

0

##### Share on other sites

Checking the OP's profile, and re-reading the post itself, it seems at least possible that he just came to troll or incite a flamewar over brace style.  It's quite a credit to this community that it didn't happen.

0

## Create an account

Register a new account