Re: Getting all struct members and values with introspection avoiding string mixins

2023-09-28 Thread mw via Digitalmars-d-learn
On Sunday, 1 May 2016 at 10:13:47 UTC, H. S. Teoh wrote: Using typeof(T.tupleof) seems a bit circuitous. Here's how I'd do it: void printStructInfo( T )( T info ) { import std.stdio : writefln; foreach (memb; __traits(allMembers, T)) {

Re: Binary size optimization

2023-09-28 Thread Imperatorn via Digitalmars-d-learn
On Thursday, 28 September 2023 at 08:38:42 UTC, Imperatorn wrote: Today I randomly tried compiling a hello world using DMD, LDC and gcc (yes, not gdc) I compared binary sizes and something looked off. The D ones were much larger. Sometimes 10x, with some optimizations still about 2x. But, t