Calls to struct methods and immutable
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Thu Nov 15 06:50:21 PST 2012
On 11/15/2012 03:36 PM, bearophile wrote:
> Try to avoid casts as much as possible in D, they are a great source for bugs.
> Take a look at assumeUnique, or better make your makeFoo pure so its output is
> assignable to immutable.
Thanks for the pointer to assumeUnique -- it will be useful, although AFAICS it
applies only to arrays, not to structs or other entities, no?
Alas, pure isn't an option, because the makeFoo involves some random procedures :-(
More information about the Digitalmars-d-learn
mailing list