Elegant D

Kapendev alexandroskapretsos at gmail.com
Tue Nov 25 02:04:59 UTC 2025


On Tuesday, 25 November 2025 at 01:18:21 UTC, Walter Bright wrote:
> I've been thinking about writing an article about what makes D 
> an elegant language to program in. D is indeed an elegant 
> programming language.
>
> I'm interested in anecdotes, experiences and examples of 
> Elegant D to incorporate!

I like how this looks in my code :)

```d
/// A generic 2D rectangle.
struct GRect(P, S = P) if (P.sizeof >= S.sizeof) {
     GVec2!P position; /// The position of the rectangle.
     GVec2!S size;     /// The size of the rectangle.
     // ...
}
```


More information about the Digitalmars-d mailing list