Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!

We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

My OLD Syntax

  • You cannot reply to this topic
83 replies to this topic

#81 Sik_the_hedgehog   Crossbones+   -  Reputation: 1806


Posted 15 September 2013 - 07:58 AM

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!).

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.


#82 skarab   Members   -  Reputation: 482


Posted 15 September 2013 - 08:50 AM

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).

#83 Techkid   Members   -  Reputation: 116


Posted 15 October 2013 - 06:56 PM

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.

#84 mhagain   Crossbones+   -  Reputation: 8135


Posted 07 November 2013 - 03:41 PM

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.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.