Hi,
On 16/01/20 18:46, Kai Uwe Broulik wrote:
> Hi,
>
> for "auto" I think we should always annotate it with const, *, and/or &
> where appropriate:
>
> auto *something = new MyCustomType;
> auto *keyEvent = static_cast(event);
IMHO the * here is redundant and only adds noise. It's clear that
On 1/17/20 12:27 AM, David Faure wrote:
> On jeudi 16 janvier 2020 18:29:11 CET Vlad Zahorodnii wrote:
>> I would like us to copy Qt's policy [1] for consistency:
>
> OK, please do.
Done. Please notice that I did not annotate auto keywords with '*'. Once
we have an official policy, we can fix
On 1/16/20 7:29 PM, Vlad Zahorodnii wrote:
> The common practice used in KDE seems to be:
>
> for (a:b)
Alright, it looks like we all agree on this one, so I'm going to update
the Frameworks Coding Style.
On 1/16/20 7:46 PM, Kai Uwe Broulik wrote:
> for "auto" I think we should always annotate it with const, *, and/or &
> where appropriate:
>
> auto *something = new MyCustomType;
> auto *keyEvent = static_cast(event);
> const auto myList = QStringList({QLatin1String("FooThing"),
>
On 1/17/20 12:46 AM, Kai Uwe Broulik wrote:
> It provides useful visual information.
>
> auto foo = bar();
> auto baz =
I don't think that you should use auto in either case since it's not
clear what type foo and baz have.
Cheers,
Vlad
On Thu, 16 Jan 2020, 22:46 Kai Uwe Broulik, wrote:
>
> > Well, the * is completely redundant in those cases, so it doesn't bring
> anything.
> > I'd be tempted to say, let's not require it.
> > But then it raises the question of consistency (without a guideline,
> we'll have some places with *
Am Donnerstag, 16. Januar 2020, 23:27:57 CET schrieb David Faure:
> On jeudi 16 janvier 2020 18:29:11 CET Vlad Zahorodnii wrote:
> > I would like us to copy Qt's policy [1] for consistency:
> OK, please do.
+1, thanks for the initiative, Vlad.
> Kai-Uwe wrote:
> > for "auto" I think we should
On Thursday 16 Jan 2020 18:46:06 Kai Uwe Broulik wrote:
> Hi,
>
> for "auto" I think we should always annotate it with const, *, and/or &
> where appropriate:
>
> auto *something = new MyCustomType;
> auto *keyEvent = static_cast(event);
> const auto myList =
Well, the * is completely redundant in those cases, so it doesn't bring
anything.
I'd be tempted to say, let's not require it.
But then it raises the question of consistency (without a guideline, we'll have
some places with * and some places without *).
It provides useful visual
On jeudi 16 janvier 2020 18:29:11 CET Vlad Zahorodnii wrote:
> I would like us to copy Qt's policy [1] for consistency:
OK, please do.
> for (a:b)
+1
Kai-Uwe wrote:
> for "auto" I think we should always annotate it with const, *, and/or &
> where appropriate:
> auto *something = new
Hi,
for "auto" I think we should always annotate it with const, *, and/or &
where appropriate:
auto *something = new MyCustomType;
auto *keyEvent = static_cast(event);
const auto myList = QStringList({QLatin1String("FooThing"),
QLatin1String("BarThing")});
auto = foo[bar];
The common
Hi,
I would like to update our coding conventions
https://community.kde.org/Policies/Library_Code_Policy.
The auto keyword is not mentioned leading to it being a common point of
contention in reviews as we can't point to a reference.
I would like us to copy Qt's policy [1] for consistency:
12 matches
Mail list logo