On Friday, 1 December 2023 at 13:02:06 UTC, Dom DiSc wrote:
```d
S Fun(){ return { 5, 2 }; }
```

This IS an initialization and the type is known. Requiring the repetition of the type is also here annoying.

Technically you don't *have* to repeat the type. You can write the return type as `auto`:

```d
auto fun() { return S(5, 2); }
```

Or you can use `typeof(return)`:

```d
SomeReallyLongReturnType fun()
{
    return typeof(return)(5, 2);
}
```

Reply via email to