Nested Structs (Solution)

d coder dlang.coder at gmail.com
Wed Dec 12 17:55:57 PST 2012


> The name doesn't matter. I just wanted to annoy Walter again with yet
>> another bit of evidence that completeness of a feature is important even if
>> it doesn't seem to have an obvious use case. People will do what is logical
>> and end up with hacks like that.
>>
>
I believe it *is* an obvious use case. In D we use structs when we want to
save on memory. And creating a class environment to encapsulate a system of
structs is an obvious use case. In fact I am in this situation and thanks
to your hack, I will try to use it for the time being.


>
>>  Little would have to be done to the structs to make it work. In fact,
>>> the method should work if D ever decides to support such a feature with
>>> little change. Compile times could be increased though by removing the
>>> templating, but unfortunately that might require a lot of work. A mixin
>>> might simplify it.
>>>
>>
> Ok, maybe thats why my posts have not received any attention except by you
> ;)


Let us trend it ;-)

Regards
- Puneet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121213/eaf4a15f/attachment.html>


More information about the Digitalmars-d mailing list