Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: New naming convention  (Read 85195 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
New naming convention
« Reply #135 on: March 12, 2012, 06:20:17 pm »
I've updated the online documentation :)
Laurent Gomila - SFML developer

texus

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
    • TGUI
    • Email
New naming convention
« Reply #136 on: March 12, 2012, 06:25:56 pm »
Quote
And why isn't it in -Wall (which I assumed gathered all the possible warnings)?
I don't know, I guess -Wall just doesn't work like it should.

I just tested it again: no warnings with -Wall, but warnings with only -Wshadow.
I usually have almost all those checkboxes checked, so that I am sure to get all warnings.
TGUI: C++ SFML GUI

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
New naming convention
« Reply #137 on: March 12, 2012, 06:45:54 pm »
Quote from: "Laurent"
It's pushed.
So it has come to this. :D
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
New naming convention
« Reply #138 on: March 12, 2012, 07:30:16 pm »
Quote from: "Nexus"
So it has come to this. :D


Haha

Just noticed it in the new documentary.
Not sure if I should like it...  :D

Btw Laurent: You might want to update your first post, incase people stumple up on it and get confused why the getters are still in there. ;-)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

coolhome

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
New naming convention
« Reply #139 on: March 12, 2012, 07:56:24 pm »
And so it begins...

Massive port of everything I've done! Laurent you never cease to break my code but when you do, it's usually worth it in the long run. :lol: For that I must say thanks for providing a very neat library!
CoderZilla - Everything Programming

Mjonir

  • Full Member
  • ***
  • Posts: 142
    • View Profile
New naming convention
« Reply #140 on: March 12, 2012, 08:43:29 pm »
Quote from: "Laurent"
And why isn't it in -Wall (which I assumed gathered all the possible warnings)?


Unfortunately that's not how it works. "-Wall" only activates an actually vey specific set of warnings: http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

As you can see there is also "-Wextra" which activates a bunch of others, and a few "extra extra" options that are in neither :/


Lots of these warnings could be useful, but I get SO many warnings from the libraries I use that it's simply not possible to keep them on. If anyone knows a solution to only display warnings for you own project, I'd be grateful! :P

robvleugel

  • Newbie
  • *
  • Posts: 29
    • View Profile
New naming convention
« Reply #141 on: March 12, 2012, 10:12:42 pm »
Downloading the newest snapshot right now...
I hope a "find - replace all" will do
I hope this new version also fixes all those heap corruption bugs I'm getting in my game lately

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
New naming convention
« Reply #142 on: March 13, 2012, 04:18:18 am »
Quote from: "Mjonir"
Quote from: "Laurent"
And why isn't it in -Wall (which I assumed gathered all the possible warnings)?


Unfortunately that's not how it works. "-Wall" only activates an actually vey specific set of warnings: http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

As you can see there is also "-Wextra" which activates a bunch of others, and a few "extra extra" options that are in neither :/


Lots of these warnings could be useful, but I get SO many warnings from the libraries I use that it's simply not possible to keep them on. If anyone knows a solution to only display warnings for you own project, I'd be grateful! :P

Use -isystem instead of -i for includes. CMake even has an option for that when specifying include dirs.

eigenbom

  • Full Member
  • ***
  • Posts: 228
    • View Profile
New naming convention
« Reply #143 on: March 13, 2012, 10:07:29 am »
So ... many ... compilation ... errors ... 28kLOC to sift through and update ...  >:(

Edit: I do like the new naming convention better though. :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
New naming convention
« Reply #144 on: March 13, 2012, 10:52:07 am »
Quote
So ... many ... compilation ... errors ... 28kLOC to sift through and update ... >

But from now on you won't have to change anything until SFML 3, isn't it great? :P
Laurent Gomila - SFML developer

eigenbom

  • Full Member
  • ***
  • Posts: 228
    • View Profile
New naming convention
« Reply #145 on: March 13, 2012, 11:05:42 am »
Quote from: "Laurent"
Quote
So ... many ... compilation ... errors ... 28kLOC to sift through and update ... >

But from now on you won't have to change anything until SFML 3, isn't it great? :P


Hehe, yeh that is great news. :)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
New naming convention
« Reply #146 on: March 13, 2012, 06:04:06 pm »
Quote from: "Laurent"
But from now on you won't have to change anything until SFML 3, isn't it great? :P
In other words: Everything that doesn't please you now is carved in stone until then :P

(Sorry, couldn't resist, don't take it too seriously :D)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
New naming convention
« Reply #147 on: March 13, 2012, 06:22:11 pm »
Quote
In other words: Everything that doesn't please you now is carved in stone until then

In other other words: SFML 3 will be released much sooner than you expect :lol:
Laurent Gomila - SFML developer

Yours3lf

  • Newbie
  • *
  • Posts: 43
    • View Profile
New naming convention
« Reply #148 on: March 13, 2012, 08:17:57 pm »
Hi Laurent,

I've just checked out the new SFML snapshot with the new naming, and I just thought about posting about it when I saw this thread.

I've experienced other renamings in the past (in connection with SFML) so this didn't catch me off guard, and I don't want to tell you which convention to use, but you should definitely decide it now.

Personally I prefer the lower_case writing of everything, I don't even use Class names, I only like to use UPPER CASE for #define stuff, except header guards. For example:

Code: [Select]
#ifndef header_h
#define header_h

#define ZERO 0

const int global_variable = 1;

namespace a_name_space
{
  class a_class_name
  {
    private:
       int this_is_a_long_variable;
    protected:
    public:
      a_class_name() : this_is_a_long_variable( 1 )
      {
        do_some_stuff();
      }
  };
}

#endif


and since I use KDevelop I can use its handy reformat source functionality, which lets me set up a personalized code look.

Also it has a nice auto-completion feature, so no matter what convention you use I'm perfectly comfortable with it :)

Another thing is function names, those should be made permanent as well.
For example the recent ShowCursor vs. setMouseCursorVisible
and sf::Timer::Reset vs Restart vs restart

I'm really looking forward to the stable SFML 2.0 :)

BMB

  • Newbie
  • *
  • Posts: 21
    • View Profile
New naming convention
« Reply #149 on: March 13, 2012, 08:34:47 pm »
Quote from: "Laurent"

In other other words: SFML 3 will be released much sooner than you expect :lol:

One release at a time, please. We would be happy to see SFML 2 (no pressure). SFML 3 should wait until at least a week later.

 

anything