* Allowing run-time typing (RTTI) I would allow it, but be very careful not to depend havily on it. What I see often, is the following construct:
if(dynamic_cast<X*>(a) != NULL) do X specific function calls on a else if(dynamic_cast<Y*>(a) != NULL) do Y specific function calls on a This should be avoided by using polymorphism. (Using the Liskov Substitution Principle is also a good idea) * Utilizing exceptions (pervasively, minimally, not at all, etc) I like to use exceptions for non recoverable errors. On throwing the exception, as much information as possible about the error is saved in an Exception class. Exceptions are catched in one place, to avoid repeating the same error reporting code. Sometimes exceptions should be catched earlier, just to be able to add more user understandable error information to a new exception (for example, when an exception occurs at a place where little is known about the usage context) * Inheritance structures to allow (multiple, single inheritance with multiple interface, pure single) Multiple inheritance can be tricky. I would like to use single inheritance (for IS-A relations) And multiple interface inheritance (for IMPLEMENTS relations; the same interface can apply to different kind of (otherwise unrelated) objects) I would like to precede interface type names with an 'I' (e.g. IRotatable, IScalable, IColorable) NOTE: The meaning of interface here is different from the class interface as defined in a header file. It is more like a Java of C# interface. It can be simulated by using an abstract class with only pure virtual functions. * Documentation (how much of this needs to be spelled out up front) Probably some UML(-like) diagrams (class diagrams and maybe some sequence diagrams). Or just the header files with some information about the usage. * Communication (mailing list, forum, irc, hybrid) A forum. IRC does not work here at TNO. :( Regards, Wim Bokkers This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/disclaimer/email.html ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
