[patches] [PATCH 2/4] Move tuple_compare wrappers to key_def.h/.cc

Vladimir Davydov vdavydov.dev at gmail.com
Sun Feb 18 13:40:24 MSK 2018


On Sat, Feb 17, 2018 at 11:47:50PM +0300, Konstantin Osipov wrote:
> * v.shpilevoy at tarantool.org <v.shpilevoy at tarantool.org> [18/02/17 23:36]:
> > Ask Kostja about it. It is his idea.
> 
> The single-line wrappers don't work without key_def. By putting
> them to key_def.h we reduce the number of necessary includes. 

IMHO it's semantically incorrect to put tuple manipulation functions to
key_def.h, which is all about key_def helpers. If we ever have to extend
tuple_compare() or tuple_extract_key() so that they are not one-line
wrappers anymore, we'll have to move them back to tuple_compare.h and
tuple_extract_key.h.

> They don't belong to tuple_extract_key.h, because most of users of
> tuple_extract_key.h don't use these wrappers (grep it).

Grepped. The only file that includes tuple_extract_key.h and
tuple_compare.h and doesn't use those wrappers is key_def.cc.

> I see no point in adding a separate file like "key_def_wrappers.h",
> hence a single file.

Up to you.

> 
> > 
> > С уважением, Владислав Шпилевой.
> > 
> > > 17 февр. 2018 г., в 21:52, Vladimir Davydov <vdavydov.dev at gmail.com> написал(а):
> > > 
> > >> On Tue, Feb 13, 2018 at 06:28:36PM +0300, Vladislav Shpilevoy wrote:
> > >> They have no sense without key_def.h.
> > > 
> > > So what? If we followed this flawed logic, we ended up moving all source
> > > code to a single file. If there's another reason why you cannot make
> > > progress without it, please share, otherwise drop this patch.



More information about the Tarantool-patches mailing list