[Pharo-dev] Immutability support

Sven Van Caekenberghe sven at stfx.eu
Wed Jan 25 05:59:24 EST 2017


> On 25 Jan 2017, at 11:55, Denis Kudriashov <dionisiydk at gmail.com> wrote:
> 
> 
> 2017-01-25 11:47 GMT+01:00 Norbert Hartl <norbert at hartl.name>:
> To be honest I think #isReadOnlyObject: is worse :) isXXX is a prefix for testing methods. isXXX with an argument feels even more strange. I would rather have #beReadOnly 
> 
> Now there is #beReadOnlyObject and #beWritableObject. Maybe for primitive it is better to use #primReadOnlyObject:.

why the object suffix, everything is an object, right ?

the simplest wording is often the best, unless there is a good reason for something else.

> It also raise another question: does these primitives support mirror approach? (when it can be called with receiver as first argument?)





More information about the Pharo-dev mailing list