Sign in to follow this  

engine design

This topic is 4863 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 am programming on my engine and Im already quite far. Now, possibly, I did a litle mistake. I prefixed all my classes and structs with the hungarian notation, which I like in this case('C' and 'S') but I didnt include an Engine specific prefix. Like say its called MyEngine CMESomething instead CSomething Now Im wondering wether you guys think I should go through ALL my code and change the prefixes or live without them. I personally dont mind it. I can manage the game code without these class names but what would other people say that use the engine? Would it be a big enough poblem to justify the hours of brainless work in changing prefixes(well possible the work could be limited by writing a programm that does it bu still) -CProgrammer

Share this post


Link to post
Share on other sites
I remebered that once I've made application (called 'SmartReplacer') which simply 'replaces' a given phrase in all files (specified by a list). Well, it was one of my first Windows apps so I can't give me oath it's 100% working. ;) AFAIK when I used it everything seemed pretty fine. Anyway, I'd suggest doing backups. :P If you are interested just e-mail me : aero@priv.ckp.pl . I can send you the application + I'll need to write some help since all the program (instead of its name) is completly in Polish. :)

See ya'

----------------

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi,

I don't think, you should use your power on those things, just stick to the notation you use right now.

I personaly don't like stuff like
CClassName
I'm more in favor of
ClassName

The Name itself should explain what its for, not some prefix.

And why use the "My" stuff ?
If you need to seperate, use namespaces ...

Share this post


Link to post
Share on other sites
I used to use prefixes and realised it actually killed portability of code between projects. I hated to see libraries with prefixes from an old library so started using Namespaces. For a while it was hard to drop the prefix but I've finally shaken it off now and to be fair, it makes everything seem a lot cleaner.

Share this post


Link to post
Share on other sites
Another vote for namespaces! With a namespace, you are guaranteed to have a unique name within that namespace. You can think of NameSpace:: as your "prefix" if that makes you happy :-)

And i don't like "CClass" either. In fact, i vehemently hate it. All that does is make it harder to read IMHO. Of course it's a Class. You know that, i know that, we all know that. What else would it be? When i was first getting into programing i could not for the life of me figure out why everyone put extra C's in front of everything. It always made it difficult to read for me and still does.



Share this post


Link to post
Share on other sites

This topic is 4863 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this