Ah. Well, appearance and familiarity is a factor in good design.Quote:
It's that I like value semantics.
No. I had "polymorphisms" in mind anyway and my post was written within that context.Quote:
If you want to hide implementation details, use interfaces, unless you already intend to use the Bridge pattern.
Another reason would be copy-on-write semantics.
No. You don't need to introduce "Pimpl" (pointer-to-implementation or "Handle/Body" if you prefer) to satisfy "Copy-on-Write".
If the implementation details don't need to be hidden (You might have, for example, a simple string class with value semantics having no need for system specific details so no need to hide implementation details at all.) you only need reference counting and the ability to copy the "value".
If you have a value class referencing unknown state you've already introduced the need for the "Pimpl" or other facility that may hide implementation details (The value class from the point of view of the client already does not know the implementation details.) so you can use that same mechanic to get "Copy-On-Write".