fat struct style guide?

user1234 user1234 at 12.de
Tue Feb 24 18:49:58 UTC 2026


On Tuesday, 24 February 2026 at 16:56:57 UTC, monkyyy wrote:
> Your thinking with oo and not type theory and anti-safetyism; 
> it would be a style guide and acceptable callsite usage 
> patterns; not a meta-program.
>
> C-sytle code needs a compiler that handles offsets of structs 
> and void* an oo-compiler needs an enforced type theory and 
> indirection about every turn.
>
> When you say "substructs" your imagining enforced type theory, 
> when you say "autogenerate the fat struct" your ideas would 
> then nesserisate type-indirection at the function level that 
> would be very very complex to metaprogram or some new compiler 
> feature like ecs.
>
> Its c-like code and enabling "unsafe" void* hacks.
>
> Gist code from last night(I already see one improvement and 
> expect more):

The tagged union approach is actually faster when you deal with a 
situation such as

- you only care about final types
- your final types have several bases
- you would cast a lot
- you don't care about nicely looking declarations (e.g SDL 
event, XEvent, etc 🤢)


More information about the Digitalmars-d-learn mailing list