On 11/07/2012 19:49, Andrei Alexandrescu wrote:
On 7/11/12 1:40 PM, Jakob Ovrum wrote:
Some classes don't lend themselves to immutability. Let's take something
obvious like a class object representing a dataset in a database. How is
an immutable instance of such a class useful?

This is a good point. It seems we're subjecting all classes to certain
limitations for the benefit of a subset of those classes.

Andrei

Did you saw the proposal of feep/tgehr on #d ?

It basically state that you can overload a const method with a non const one if :
 - You don't mutate any data that belong to the parent.
- You are prevented to create any immutable instance of that classe or any subclasse.

Reply via email to