On Sunday, 17 September 2023 at 15:55:37 UTC, Vitaliy Fadeev wrote:
Is it possible to write like this in D?

```d
struct Message
{
   ulong timestamp;
}

Message LongMessage
{
    ubyte[255] s;
}
//
// it mean
//
// struct LongMessage
// {
//     Message _super;
//     alias _super this;
//     ubyte[255] s;
// }
//
// or
//
// struct LongMessage
// {
//     ulong timestamp;
//     ubyte[255] s;
// }
```

Is it possible?

No, there's no struct inheritance. But you can just write the `alias this` version manually.

Reply via email to