Re: [Maria-developers] Refactoring in LEX_STRING and LEX_CSTRING

2017-04-20 Thread Alexander Barkov
Hi, Monty, Marko, Vicentiu, thanks for your replies. I collected all input to: https://jira.mariadb.org/browse/TODO-916 Please have a look. Input from other developers would be very welcome! Thanks. On 04/20/2017 09:57 AM, Alexander Barkov wrote: >> >> I'd propose two things instead: >>

Re: [Maria-developers] Refactoring in LEX_STRING and LEX_CSTRING

2017-04-20 Thread Marko Mäkelä
Hi Monty, I think that we should follow the modern conventions here. The Google style guide (which the MySQL group at Oracle is trying to follow) says that it is OK to pass references to const objects, but it generally forbids references to non-const:

Re: [Maria-developers] Refactoring in LEX_STRING and LEX_CSTRING

2017-04-19 Thread Alexander Barkov
Hi Monty, On 04/20/2017 09:35 AM, Michael Widenius wrote: > Hi! > > On 20 Apr 2017 06:10, "Alexander Barkov" > wrote: > > Hello all, > > > Monty is now doing refactoring: > > 1. Replacing a lot of LEX_STRING to LEX_CSTRING. > >

Re: [Maria-developers] Refactoring in LEX_STRING and LEX_CSTRING

2017-04-19 Thread Michael Widenius
Hi! On 20 Apr 2017 06:10, "Alexander Barkov" wrote: Hello all, Monty is now doing refactoring: 1. Replacing a lot of LEX_STRING to LEX_CSTRING. 2. Fixing functions and methods that have arguments of types: a. pointer "const LEX_STRING *name" and b. reference "const

Re: [Maria-developers] Refactoring in LEX_STRING and LEX_CSTRING

2017-04-19 Thread Vicențiu Ciorbaru
Hi! I would like to add a few more arguments in favour of using const references and not const pointers. I do not endorse non-const references, that makes the code silly and confusing a lot of the times. When we need output or input-output parameters we should keep using pointers. For strictly

[Maria-developers] Refactoring in LEX_STRING and LEX_CSTRING

2017-04-19 Thread Alexander Barkov
Hello all, Monty is now doing refactoring: 1. Replacing a lot of LEX_STRING to LEX_CSTRING. 2. Fixing functions and methods that have arguments of types: a. pointer "const LEX_STRING *name" and b. reference "const LEX_STRING ". to the same style. Monty chose passing by pointer (2a). I think