[Development] The age-old T* foo vs. T *foo
Kai Pastor, DG0YT
dg0yt at darc.de
Fri Oct 18 08:02:06 CEST 2019
Am 17.10.19 um 23:55 schrieb André Pönitz:
> On Fri, Oct 18, 2019 at 12:24:12AM +0300, Ville Voutilainen wrote:
>> On Fri, 18 Oct 2019 at 00:16, André Pönitz <apoenitz at t-online.de> wrote:
>>> On Thu, Oct 17, 2019 at 09:04:36PM +0300, Ville Voutilainen wrote:
>>>> Since we are about to do a major version upgrade, should be stop being
>>>> a special snowflake in the C++ world and start attaching pointer-stars
>>>> and reference-ampersands to the type instead of to the variable?
> It's a huge effort for discussion and conversion effort
> for practically no gain.
> And it opens the gate for more such fruitless discussions
> snake_style vs camelStyle
> east const vs west const
> getter/setter naming convention
> Q prefix
> I also think that there are more than enough open issues
> in JIRA that, when solved, would have more practical impact
> than shifting around white space in the code base.
Maybe the discussion is not fruitless, even it only helps to write down
the rationale for the current style. Especially "const" is the most
interesting keyword next to pointer-star.
This is familiar:
const char *key = "word" vs. const char* key = "word"
// east-side const: char const *key...
But what its the most readable for a const pointer?
char *const key vs. char* const key
More information about the Development