February 09, 2022 Re: Discussion Thread: DIP 1043--Shortened Method Syntax--Community Review Round 1 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Timon Gehr | On Wednesday, 9 February 2022 at 14:10:57 UTC, Timon Gehr wrote:
> On 09.02.22 14:46, Kagamin wrote:
>> Another single valued method:
>> ```
>> static string getPipeName(int pid)
>> {
>> return string.Format("{0}-{1}", _baseName, pid);
>> }
>> static string getPipeName(int pid) => string.Format("{0}-{1}", _baseName, pid);
>> ```
>> 88 and 79 characters, 10% saving.
>
> I don't think this is primarily about saving characters.
Yep, that's definitely not the primary goal. It's to reduce verbosity instead.
|
Copyright © 1999-2021 by the D Language Foundation