[Cuis-dev] Immutability package

Hernan Wilkinson hernan.wilkinson at 10pines.com
Thu May 7 11:56:41 PDT 2020


Hi,
 I just added to Cuis-Smalltalk-Dev/Packages/System a package to set an
object as immutable.
 The package name is Immutability.pck.st and it has tests in
ImmutabilityTest.pck.st

 To make an object immutable just send the message #beImmutable to it. To
make it mutable #beMutable.
 If you try to modify an immutable object the ModificationForbidden
exception will be signal which is resumable.

 Please, look at the tests for more examples.

Cheers!
Hernan.

-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200507/cf454d00/attachment.htm>


More information about the Cuis-dev mailing list