Is D painted into a corner?

Serg Gini kornburn at yandex.ru
Mon Sep 1 12:35:34 UTC 2025


On Monday, 1 September 2025 at 12:20:02 UTC, Kapendev wrote:
>
> Insane way to do things:
>
> ```d
> struct Matrix(R, C, T, bool canFly, bool isCute) if 
> ((isNumberType!T || isMathType!T) && isGoodType!T && 
> isMagicType!T) {
>     static if (canFly) {
>         this(Blah blah) {
>             // Blah blah...
>         }
>     } else static if (isCute) {
>         this(Blah blah) {
>             // Blah blah...
>         }
>     } else {
>         // Blah blah...
>     }
>     // Just more template hell...
> }
> ```

I don't know other languages which like more insanity than D :)


More information about the Digitalmars-d-learn mailing list