engine design

Started by
9 comments, last by thedevdan 19 years, 8 months ago
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
Advertisement
Could you use a namespace? IMO those are preferable to prefixes.
Minister of Propaganda : leighstringer.com : Nobody likes the man who brings bad news - Sophocles (496 BC - 406 BC), Antigone
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'

----------------
___Quote:Know where basis goes, know where rest goes.
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 ...
Thanks for the replys.
The namespace idee sounds good. I never really use namespaces but in this case it definetely seems like the cleanest solution.
Thanks

-CProgrammer
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.
Good point.
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.



I agree with you all: no prefix, namespace use, AND NO "C"
- AdMiRaLP.S. sorry, I'm french, so i may not always speak english perfectly.
Visual C++ can replace in all files

simply replace things like:

class C

with class CME
---Yesterday is history, tomorrow is a mystery, today is a gift and that's why it's called the present.

This topic is closed to new replies.

Advertisement