How add class or struct member after construction?

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Nov 5 22:56:21 UTC 2020


On Thu, Nov 05, 2020 at 10:48:38PM +0000, Marcone via Digitalmars-d-learn wrote:
> How add class or struct member after construction? Is it possible in
> D? How?

You can't, because D is statically-typed.

However, you *can* implement something equivalent manually by other
means, depending on your use case.  What use do you have in mind?  If
you're more specific about what you're trying to accomplish, we could
figure out a possible implementation for you.


T

-- 
Why waste time learning, when ignorance is instantaneous? -- Hobbes, from Calvin & Hobbes


More information about the Digitalmars-d-learn mailing list