<div>Good day everyone.</div><div>š</div><div>Recently I've tried to write some social network parsing code and faced with numerous nesting of structures (records).</div><div>When I completely tired to write things like Friend.BaseUser.City.ID ("real programmer will never get complerely tired", hah - yes, I know), I thought out that it might be cool to have such a feature as structures inheritance.</div><div>I'm not very good in English, so, instead of describing everything I'll just try to write an example:</div><div>š</div><div><a href="http://pastebin.com/Pm701Nh4">http://pastebin.com/Pm701Nh4</a></div><div>š</div><div>So, there's examples of addressing some fields with and without this feature:</div><div><span style="font-family:courier new,courier;">Friend.BaseUser.FirstNameš >> Friend.FirstName</span></div><div><span style="font-family:courier new,courier;">Friend.UserInfo.Country.ID >> Friend.Country.ID</span></div><div>š</div><div>And let me clarify some details:</div><div>š- fields can not be overridden;</div><div>š- record can nest several records.</div><div>š</div><div>Of course, somebody will try to advise me to use objects. :)</div><div>But never mind that</div><div>a) in procedural programming we don't use objects,</div><div>b) objects are more complex that needed</div><div>c) objects require additional routines for creating and destroying of them.</div><div>š</div><div>Best Regards,</div><div>Dmitry D. Chernov.</div>