[squeak-dev] Object>>className

Bernhard Pieber pieber at me.com
Sun Mar 26 19:33:46 UTC 2017


Am 24.03.2017 um 12:21 schrieb Levente Uzonyi <leves at caesar.elte.hu>:
> 
> On Fri, 24 Mar 2017, Tobias Pape wrote:
> 
>> 
>>> On 24.03.2017, at 01:17, tim Rowledge <tim at rowledge.org> wrote:
>>>> On 23-03-2017, at 3:10 PM, Chris Muller <asqueaker at gmail.com> wrote:
>>>> I would rather get rid of "create inst var accessors" altogether, then
>>>> you would not have that problem.   :)
>>> If I could think of a way of getting away with it I’d make it completely impossible to make methods with the same name as an ivar. All it does is encourage the sort of scoundrels ( cads! bounders! mountebanks I tell you!) that treat classes as Pascal records or C structs. Didn’tortabealloweditellya.
>> 
>> I'd rather have the opposite direction.
>> All instvars should be required to have accessors; I don't want see any code that accesses instvars directly _execpt_ accessors…
> 
> Why would that be any good?
> If it is a good idea, then what are instance variables good for?
I totally agree. This would break encapsulation of all private state.

Cheers,
Bernhard


More information about the Squeak-dev mailing list