Discussion Thread: DIP 1043--Shortened Method Syntax--Community Review Round 1
Paul Backus
snarwin at gmail.com
Fri Feb 4 19:44:36 UTC 2022
On Friday, 4 February 2022 at 17:59:40 UTC, Timon Gehr wrote:
> On 04.02.22 18:18, Tejas wrote:
>> On Friday, 4 February 2022 at 14:46:39 UTC, Paul Backus wrote:
>>> this(string y) => this(0, y);
>>> this(string y) { this(0, y); }
>> ...
>
> If you have to violate common style guidelines in order to
> support a claim that the status quo is not so much worse, then
> probably the new syntax is actually significantly better.
> (Razvan did the same in the feedback thread, I don't get why
> people are doing this. Would this really fly, e.g., in Phobos?)
It's not super common, but it does show up. Some examples:
https://github.com/dlang/phobos/blob/v2.098.1/std/algorithm/setops.d#L901
https://github.com/dlang/phobos/blob/v2.098.1/std/algorithm/iteration.d#L2051-L2052
https://github.com/dlang/phobos/blob/v2.098.1/std/encoding.d#L487-L549
https://github.com/dlang/phobos/blob/v2.098.1/std/datetime/systime.d#L9564-L9574
https://github.com/dlang/phobos/blob/v2.098.1/std/math/exponential.d#L2748-L2755
https://github.com/dlang/phobos/blob/v2.098.1/std/experimental/allocator/building_blocks/stats_collector.d#L199-L200
More information about the Digitalmars-d
mailing list