Sergei,

On Wed, Dec 18, 2019 at 1:11 PM Sergei Golubchik <s...@mariadb.org> wrote:

> Hi, Aleksey!
>
> On Dec 18, Aleksey Midenkov wrote:
> > On Wed, Dec 4, 2019 at 10:10 PM Sergei Golubchik wrote:
> >
> > But it's better to be from the other side:
> >
> > bool Lex_cstring::strdup(MEM_ROOT *mem_root, const Lex_cstring &src)
> > {
> >   // allocate and deep-copy from src to this
> > }
> >
> > I'd really like to use such utility methods instead of C variants like
> > thd_make_lex_string().
> ...
> > We better go away from this C service layer of thd_*() functions
> > between server and plugins and use class methods instead.
>
> Why is it better? Isn't it just the syntax sugar?
>

Having local class interfaces is easier to maintain. Additional API layer
is development costs overhead. It is good for version compatibility
control, but we don't have third-party plugins, do we? And we don't
strictly use API to get server services into plugin, AFAIK.


>
> The only effect I can think of - pure C plugins won't be able to use
> thd_make_lex_string() if you replace it with a C++ method.
>

Do we have such plugins and do we need them to stay pure C?


>
> Regards,
> Sergei
> VP of MariaDB Server Engineering
> and secur...@mariadb.org
>


-- 
All the best,

Aleksey Midenkov
@midenok
_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to