Hi Thorsten, > recently I was idly browsing through commit mails, and noticed two > patterns that seem to have gotten into wider usage: > > * prefix abstract classes with an 'I' - presumably not to make it > look as fashionable as an iPhone, but rather to denote it's an > 'interface' ;) > * use of fundamental types like long and int. > > Whereas I think the former is quite sensible (also the added > SAL_NO_VTABLE), I have some issues with the latter. Are there any > reasons _in favor_ of that, except for platform apis & the > occasional loop counter?
(Even the occasional loop counter should probably better be size_t ...) Without knowing concrete examples, I can only guess what long and int were used for. Last time I used them (and your first item makes me suspect it were some of my recent commit mails which triggered your post) was in a context where the classes I used forced me to. That is, Rectangle, Size, Point, and the like, work with "long". So, my client code of those usually works with longs, too, at least as long as the variables are intended for a roundtrip back to those classes. In all other cases, I'd agree that long and int should not be used for portability reasons. Ciao Frank -- - Frank Schönheit, Software Engineer [email protected] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Base http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
