Closed Bug 362842 Opened 18 years ago Closed 18 years ago

please rename nsIMsgImapMailFolder.canIOpenThisFolder

Categories

(MailNews Core :: Networking: IMAP, enhancement)

x86
SunOS
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

()

Details

Attachments

(1 obsolete file)

the I really adds no value and results in a bad hit for a certain problem I'm about to file.

canOpenFolder seems like a perfectly good name...
Attached patch change attribute name (obsolete) — Splinter Review
Assignee: bienvenu → timeless
Status: NEW → ASSIGNED
Attachment #247604 - Flags: superreview?(bienvenu)
Attachment #247604 - Flags: review?(bienvenu)
what's the problem this solves, out of curiosity?
well, first, the language/meaning/whatever is totally wrong. interfaces shouldn't deal with "I"s certainly never "canI" do this. maybe canActiveUserDoSomething.

ignoring the fact that the attribute name is just bad...

in js and other scripting languages, the systems employ interface flattening.

This involves merging properties/methods from multiple interfaces into the list of properties for a single object. If multiple interfaces have the same method then you need some way to specify which you want, this is done by including additional properties for each supported interface.

so you can do:

doppler:/Applications/Browsers/SeaMonkey.6.app/Contents/MacOS josh$ ./xpcshell 
js> Components.manager.nsIComponentRegistrar.autoRegister
function autoRegister() {
    [native code]
}
js> 

the problem is, what happens if someone decides to be annoying and name a property with the same name as an interface?

Note that not all interfaces begin 'nsI', some begin 'jsdI', or 'mozI', so while I could just complain when someone names an attribute 'nsI...', I'd rather complain whenever someone uses any 2/3 letter system that could be an interface name - bug 362843.

Your attribute isn't frozen, is used in a handful of places, and is one of only two interfaces with an attribute that could fall into this category.
Comment on attachment 247604 [details] [diff] [review]
change attribute name

ok, thx
Attachment #247604 - Flags: superreview?(bienvenu)
Attachment #247604 - Flags: superreview+
Attachment #247604 - Flags: review?(bienvenu)
Attachment #247604 - Flags: review+
Comment on attachment 247604 [details] [diff] [review]
change attribute name

mozilla/mailnews/imap/src/nsImapMailFolder.cpp 	1.739
mozilla/mailnews/imap/src/nsImapService.cpp 	1.318
mozilla/mailnews/imap/public/nsIMsgImapMailFolder.idl 	1.33
Attachment #247604 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: