The lack of a 'main' method
One thing that irritates me in some APIs is the control over the way you write your own code. I've seen a few APIs that do this, and I'm sure there are many others. Some, for example DarkGDK don't allow you to write your own 'main' method.
Others control the way you write your code: for instance many 3d libraries generally manage the game loop for you. There are ways to get around it, but not always many tutorials on it. A few I've found that do this are Ogre3D and jMonkeyEngine.
It's not just restricted to 3d libraries. I've had a quick look at Project Darkstar which is a networking library, and it seems to do a similar thing. This can become quite frustrating.
However, there are some good exceptions to this rule! Software like JUnit also forces you to write the code in a very specific way, however, in that case it is a good feature, as the library can only be used for one thing.
So, I guess the conclusion of this post is that 3rd-party API developers should consider more about making it easy for the developer to write code in their own way. Lots of the time, you may wish to integrate an API into an existing application and this can become difficult. Also, most of the time, the methods where you don't have control of your code are usually bad and not reccomended - just easy for new people doing tutorials! This is quite a significant issue, you should be instructing people to do it the correct way first of all!
Comments
Nobody has commented on this post yet.