Calls to struct methods and immutable

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Nov 29 08:28:33 PST 2012


On 11/27/2012 05:31 PM, Dan wrote:
> I'm using a custom gdup that recursively copies fields and requires no support
> from nested structs. If a dup is provided by a struct it will be called. No
> guarantees, but have a look.
> https://github.com/patefacio/d-help/blob/master/d-help/opmix/mix.d

Thanks for that -- I'll look through it carefully.

My one caveat here is that in general I'm reluctant to rely too strongly on 
3rd-party libraries at this stage of D's development.  That's particularly true 
where stuff like this is concerned -- which might well be best placed in the 
standard library itself.  Generic, broadly-applicable .dup and .idup commands 
would seem to be something that should be available in Phobos ...

... anyway, back to the specifics -- even though I could use opmix, I'd still 
really like to understand for myself how to solve the problems described in my 
previous emails -- in particular, how to effectively idup my struct containing 
the Node[uint] associative array _without_ relying on some external library.  My 
feeling is I'll learn more about D this way ... :-)



More information about the Digitalmars-d-learn mailing list