On 11/08/2012 02:50 PM, Nikolay Sivov wrote:
On 11/8/2012 15:41, Michael Stefaniuc wrote:
On 11/08/2012 01:13 PM, Christian Costa wrote:
2012/11/8 Henri Verbeet <hverbeet@gmail.com mailto:hverbeet@gmail.com>
On 8 November 2012 00:22, Michael Stefaniuc <mstefani@redhat.com <mailto:mstefani@redhat.com>> wrote: > But using just the capitalized letters from the name of the COM class as > a prefix and skipping the "Impl" would be in hindsight the better > standard. There are still 170+ COM interfaces to clean up
which is a > sizable number regardless of it being just 13% of the total interface > implementations, so we could still change the standard, especially as > the existing function/method naming standard is not strictly enforced; I > didn't bother changing "offenders" if the name was reasonable. > But I'm deferring this decision to Jacek / Alexandre as they are the > drivers of the COM standardization in Wine. I don't mind too much as I > can work with both patterns. > I think the only reasonable naming convention is to name things after the implementation structure. In this case that would still end up being "IDirectMusicLoaderImpl_...", but for a slightly different reason. Where I agree with Nikolay is that "dmloader" would be a much nicer name than "IDirectMusicLoaderImpl" for the implementation structure as well, in which case you would also end up with "dmloader_..." for method implementations.
dmloader_IDirectMusicLoader_Method or dmloader_Method?
dmloader_IDirectMusicLoader_Method
I don't think it's better than it is now.
It is better as it doesn't contain the same ICamelCaseName twice. Of course the object should be renamed then to dmloader. This is a workable solution for the people that insist on having the object name in function implementing the method.
I was just saying removing the interface name was not a good thing imo or am I missing something?
Right, the interface name needs to be there as it matches the COBJMACROS name. Basically the C macro with a prefix.
Why? If you really want to keep interface name the better way imho is as it's usually done in mshtml, like HTMLDOMTextNode_*, so here you don't need to add anything like prefix.
The first rule of COM in Wine is: "Do what Jacek says, not what he does!" ;)
HTMLDOMTextNode_* aka dropping the "I" is fine too as long as you do *not* use the same prefix for other functions. E.g. I've seen that style used for helpers.
bye michael