digitalmars.D.bugs - [Issue 21141] New: No introspection access to a field's default value
- d-bugmail puremagic.com (21/21) Aug 09 2020 https://issues.dlang.org/show_bug.cgi?id=21141
https://issues.dlang.org/show_bug.cgi?id=21141 Issue ID: 21141 Summary: No introspection access to a field's default value Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: andrei erdani.com Structs and classes should offer for introspection each field's default value. That should be available as a string that can be mixed in. For void initialization, the string would naturally be "void". A simpler alternative would be to just offer an array of immutable bytes that can be used to initialize the object. That is suboptimal because it does not skip void-initialized fields. This blocks https://github.com/dlang/druntime/pull/3174. --
Aug 09 2020