[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Goops: Setting Immutible Classes?

From: Christopher Howard
Subject: Goops: Setting Immutible Classes?
Date: Thu, 05 Oct 2017 22:00:54 -0800

Hi, is the a way I could use goops such that I the classes are non-
mutating, but have setters that simply return a new instance of the
class (instead of modifying the original)?

I suppose I could simply use define-method to create setter methods
which create a new instance of the object; but that would get rather
complicated, wouldn't it, if the object had superclasses? So I need
some kind of shallow copy mechanism for the whole object, or a chained
copy mechanism...?


Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]