Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Do you usually prefix your classes with the letter 'C' or something else?

This topic is 916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I think it's a good practice to do so.

I prefix stuff like CTextureManager, it is quite neat.

But when it comes to classes like

AStar, I feel very strange to have such a letter as the prefix...

I don't like to call it CAStar, which is very windy...

Thanks

Jack

Share this post


Link to post
Share on other sites
Advertisement

I dont prefix my classes with anything.  My convention is that classes are capitalized and that's it.  Syntax coloring helps a lot in telling what's what, and along with context you dont need anything else.

Share this post


Link to post
Share on other sites

I don't prefix classes. I can't say it doesn't help since I don't do it to know but I don't feel like I'm hindered from lack of doing it. 

Share this post


Link to post
Share on other sites

Always sounds like a nice idea but I think most people end up regretting it. I used to prefix with S for my engine because its name began with S. Didn't take long to wish hadn't of done that.

 

 

The same applies to "m_", "g_", "lpsz" and similar wretched nonsense.

 

 

Actually, m_ for members and g_ for globals helps quite a bit while reading a lot of unknown code. For example, when doing something with threading and you see that a member is used, but can't find a mutex anywhere around.

 

 

Yeah I agree. When reading UE4 source code for example, it's hard to know what is a member variable and what isn't.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!