[Cuis-dev] Immutability package
Casey Ransberger
bahweep at icloud.com
Fri May 8 15:25:27 PDT 2020
Dude I was just reading a paper about Ropes. It’s cool stuff! I also saw that there’s a ropes implementation in the Cuis repo.
I’m loving this immutability stuff, Hernan. +1 wrt Juan’s comments on this one.
—Casey
> On May 8, 2020, at 6:16 AM, Juan Vuletich via Cuis-dev <cuis-dev at lists.cuis.st> wrote:
>
> On 5/7/2020 3:56 PM, Hernan Wilkinson via Cuis-dev wrote:
>>
>> 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 Wilkinson
>> Agile Software Development, Teaching & Coaching
>> Phone: +54-011-4893-2057
>> Twitter: @HernanWilkinson
>> site: http://www.10Pines.com
>> Address: Alem 896, Floor 6, Buenos Aires, Argentina
>
> Very nice, Thanks!
>
> Next steps include how to make method literals be immutable.
>
> Something else that would be great is to gradually make Strings immutable. That would allow us to replace String with Rope if desired.
>
> Cheers,
> --
> Juan Vuletich
> www.cuis-smalltalk.org
> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
> https://github.com/jvuletich
> https://www.linkedin.com/in/juan-vuletich-75611b3
> @JuanVuletich
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200508/1b10f710/attachment.htm>
More information about the Cuis-dev
mailing list