Neil Stansbury wrote:
> I don't think that naming local variables as interfaces is a good
> idea...
Why not? As long as there are no local variable collisions (and their
usually won't be) the the code is auto-documenting, anyone reading then
immediately knows what interface the variable represents. Same when
QI'ing the interface.
It is a common and recommended practice to have constant declarations for
interfaces like so:
const nsIFile = Components.interfaces.nsIFile;
This is basically an object representing the interface IID, and helps to
reduce confusion.
--BDS
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom