Discussion Thread: DIP 1043--Shortened Method Syntax--Community Review Round 1

bauss jj_1337 at live.dk
Wed Feb 9 14:14:12 UTC 2022


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.


More information about the Digitalmars-d mailing list