Trouble with C++

C/C++ have the philosophy that you must divide the code into manageable parts. Classes, methods/functions are services that are provided.

However there are times when I cannot use these methods/functions primarily because a method/function call has some overhead. In some cases this overhead, though pretty small for a single call, adds up to large enough that it becomes imperetive to avoid using functions.

I would however, like to still break the code up into readable pieces. I am not aware of any construct that would do something like what #define does, only much cleaner. inline keyword is only a request to the compiler, not a command. So how do I solve this? If you have seen the code that I saw, you would faint. I am not blaming the programmer who wrote it, just feeling pity for him for having to go through all this just because C++ does not provide a decent construct to do that.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s