moveFront() and friends: Request for comment
Pillsy
pillsbury at gmail.com
Fri Aug 27 07:44:49 PDT 2010
dsimcha Wrote:
[...]
> I'd like any comments anyone might have on to what extent
> arbitrarily expensive postblits should be considered in the
> design of Phobos.
I agree with you: expensive post-blits just don't seem sufficiently
necessary in D to warp the design of the standard library around
them, and have a distinctly anti-patternish feel to them. You have
too many other options, like straight reference semantics, copy-on-
write, and (with immutability and GC) safely shared structure.
The last can be an incredibly useful technique for reducing the
cost of copying, because it allows you to treat an immutable
reference type exactly like a value type.
Cheers,
Pillsy
More information about the Digitalmars-d
mailing list