Property discussion wrap-up
Zach the Mystic
reachBUTMINUSTHISzach at gOOGLYmail.com
Wed Jan 30 14:07:27 PST 2013
On Wednesday, 30 January 2013 at 21:41:58 UTC, Zach the Mystic
wrote:
> But what if B actually had some data? The only solution is to
> have one pointer for every struct it's nested inside of. I can
> imagine it getting tricky in this case. If it were so tricky as
> to be prohibitive to implement, then all is not lost. You can
> still implement zero-data structs as properties. In that case,
> I suggest weaving the implementation in directly with the
> Highlanders, because Highlanders will be much less appealing
> for any other use.
I should correct myself, I think. You need one pointer for every
struct nested which actually holds data.
And I take back the connection between Highlanders and zero-data
structs. The other possible use for Highlanders which I was
thinking of is for quick prototyping, since "foo struct {}" is
much easier to type than "struct Foo {}; Foo foo;". I see no real
problem with these even if non-static, non-zero-data nested
structs are not allowed access to their parent structs.
More information about the Digitalmars-d
mailing list