Re: [Development] proposed clang-format improvements for lambda functions

2025-10-18 Thread Thiago Macieira
On Friday, 10 October 2025 01:54:23 Pacific Daylight Time Christian Kandeler via Development wrote: > 1) Note that there is no built-in formatter, only an indenter. > 2) Indenting via clang-format has been the default for a while and is > recommended for modern C++ code bases. Are you sure you are

Re: [Development] proposed clang-format improvements for lambda functions

2025-10-18 Thread Artem Dyomin via Development
ago ; [email protected] Subject: Re: [Development] proposed clang-format improvements for lambda functions >> AllowShortLambdasOnASingleLine: None >> LambdaBodyIndentation: OuterScope >> >> rationale: >> * single-line lambda functions are harmful, as one can

Re: [Development] proposed clang-format improvements for lambda functions

2025-10-18 Thread Christian Kandeler via Development
On 10/10/25 12:53 AM, Thiago Macieira wrote: On Tuesday, 7 October 2025 21:57:57 Pacific Daylight Time Tim Blechmann via Development wrote: I'm not sure I understand the second. More importantly, though: does Qt Creator have a setting for that? If so, what it is? If not, then DOA. when using t

Re: [Development] proposed clang-format improvements for lambda functions

2025-10-17 Thread Philippe
> i'd like to propose the following improvements to the clang-format: > > AllowShortLambdasOnASingleLine: None I tried that for a few months (for the same reasons as yours). Then I reverted. In my experience, it makes the code harder to read more often than necessary. Now, when I want to clearl

[Development] proposed clang-format improvements for lambda functions

2025-10-17 Thread Tim Blechmann via Development
i'd like to propose the following improvements to the clang-format: AllowShortLambdasOnASingleLine: None LambdaBodyIndentation: OuterScope rationale: * single-line lambda functions are harmful, as one cannot set different breakpoints for construction and invocation of the lambda function. * ind

Re: [Development] proposed clang-format improvements for lambda functions

2025-10-17 Thread Thiago Macieira
On Tuesday, 7 October 2025 17:45:37 Pacific Daylight Time Tim Blechmann via Development wrote: > AllowShortLambdasOnASingleLine: None > LambdaBodyIndentation: OuterScope > > rationale: > * single-line lambda functions are harmful, as one cannot set different > breakpoints for construction and inv

Re: [Development] proposed clang-format improvements for lambda functions

2025-10-13 Thread Thiago Macieira
On Tuesday, 7 October 2025 21:57:57 Pacific Daylight Time Tim Blechmann via Development wrote: > > I'm not sure I understand the second. More importantly, though: does Qt > > Creator have a setting for that? If so, what it is? If not, then DOA. > > when using the "built in formatter" instead of t

Re: [Development] proposed clang-format improvements for lambda functions

2025-10-11 Thread Tim Blechmann via Development
AllowShortLambdasOnASingleLine: None LambdaBodyIndentation: OuterScope rationale: * single-line lambda functions are harmful, as one cannot set different breakpoints for construction and invocation of the lambda function. * indent lambda bodies at the outer scope, so that the indentation reflects

Re: [Development] proposed clang-format improvements for lambda functions

2025-10-09 Thread Tim Blechmann via Development
>> I kind of like single-line lambdas, but I understand not doing them for >> breakpoint purposes. Still, we may want them for simple parameters. That's a >> stylistic choice. + 1 who also likes single-line lambdas that are doing a simple job (e.g., returning a constant value or further cal