Jim Starkey wrote: > Mats Kindahl wrote: >> Kristian Nielsen wrote: >> >>> Jay Pipes <[EMAIL PROTECTED]> writes: >>> >>> >>>> Mats Kindahl wrote: >>>> >>>>> I this we should seriously consider a robust interface into the >>>>> internals of the >>>>> server. For this purpose, the THD/Session should be an opaque >>>>> pointer, and then >>>>> be should provide a set of functions to get information from the >>>>> opaque pointer. >>>>> >>>> +++ I've been arguing for this approach for a while. Zero access to >>>> internals except through a well-defined and documented interface (i.e. >>>> public methods of a class). Want to change a session variable, then >>>> change it via an API...not via access to a public member variable. >>>> >>> I think we also need to be aware of performance. >>> >>> Eg. for storage engine plugins, I think inlined access to internals >>> (item, >>> condition pushdown, ...) is necessary for best performance. For storage >>> engines, I think performance is more important than ABI stability. >>> >>> For other engines, performance may not be a problem, so they could >>> use only >>> opaque interfaces. >>> >>> So maybe some interfaces can be opaque, and some should remain internal? >>> >> >> I do not agree with that (entirely), since that would force the layout of >> objects to be fixed, which is usually not a good idea. >> >> For some specific cases, where it is known that items are stable and >> critical to >> performance, it could be possible to provide inline functions to >> access the >> internals, but I think that should be an exception. >> >> > > Mats, inline functions defeat the original purpose of hiding the > internals. A virtual method hides the implementation from the client; > and inline does not. Virtual functions will continue to work after a > change is made to the internals. An inline function will not. > > Clean interfaces totally trump the odd nanosecond here and there gained > from an inline vs. virtual function.
As I said, inline functions is an exception used for special cases where it is deemed necessary. I don't see what you disagree with here. Best wishes, Mats Kindahl -- Mats Kindahl Lead Software Developer Replication Team MySQL AB, www.mysql.com
begin:vcard fn:Mats Kindahl n:Kindahl;Mats org:Sun Microsystems adr;quoted-printable:;;Tegv=C3=A4gen 3;Storvreta;SE;74334;Sweden email;internet:[EMAIL PROTECTED] title:Lead Replication Software Developer x-mozilla-html:FALSE version:2.1 end:vcard
_______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

