Discussion Thread: DIP 1043--Shortened Method Syntax--Final Review
Timon Gehr
timon.gehr at gmx.ch
Tue Jun 28 23:24:03 UTC 2022
On 28.06.22 15:38, welkam wrote:
> On Tuesday, 28 June 2022 at 11:25:53 UTC, WebFreak001 wrote:
>> ```d
>> int width() => shape.match!(
>> (Box b) => b.width,
>> (Circle c) => c.radius * 2
>> );
>> ```
> Thank you for providing excellent example for an argument against this
> DIP. To a person who haven't coded in D for a while it was hard to
> understand what that code did.
Matching a couple of parentheses is not particularly D-specific.
More information about the Digitalmars-d
mailing list