Discussion Thread: DIP 1043--Shortened Method Syntax--Final Review
bauss
jj_1337 at live.dk
Wed Jun 15 11:48:48 UTC 2022
On Wednesday, 15 June 2022 at 11:45:14 UTC, Basile B. wrote:
>
> Otherwise the concern about void is valid but I think that this
> can be solved easily during the semantic passes: if we're in a
> func and if we're in a shortened func then if this func is void
> then inserts a void cast to the expression. No technical issue
> there, as long as there's a flag that makes shortened funcs
> recognizable after lowering.
>
> ```d
> // void f() => 0;
> void f() {return cast(void)0;}
> ```
Yes, to be honest; I don't really care about how it's solved,
just that it's possible to write code equivalent to what I can in
C#.
More information about the Digitalmars-d
mailing list