August 10, 2020 [Issue 21141] New: No introspection access to a field's default value | ||||
---|---|---|---|---|
| ||||
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. -- |
Copyright © 1999-2021 by the D Language Foundation