[squeak-dev] Balance of metrics

Tobias Pape Das.Linux at gmx.de
Mon Mar 12 18:48:20 UTC 2018


tim, 


> On 12.03.2018, at 19:29, tim Rowledge <tim at rowledge.org> wrote:
> 
> 
> 
>> On 12-03-2018, at 11:20 AM, Chris Muller <asqueaker at gmail.com> wrote:
>> ot all have the
>>> same aesthetic.
>> 
>> Indeed.  I will continue to object to changes which move it away from
>> mass-appeal and compatibility.
> 
> One thing I believe would help a bit with this (and other problems) would be a proper way to make private methods. It's just plain wrong that one can send messages that refer to code which is a part of some internal process which is not meant for 'outside' use.
> 
> Eliot & I were talking about it a while back and  IIRC thought that it would be practical these days to have an "I'm sending this message to myself" send, along with some futzing when doing lookup. With inline caching I don't think it would have any measurable effect on performance. Basically if the method is private then it simply isn't 'seen' during lookup unless the send is a self-send. Or something like that.
> 
> 

well, I think the compiler complains if you send messages starting with 'pvt' to something other than self, right?

Other than that, I think there's too much merit in "vars are private, messages are public" than to introduce an outright restrictive messaging model.

You'll never know what part of your objects interface is gonna being needed down the road. Rather, I think it's a good challenge to code every method as if it was public interface. I know that's hardly possible, but for the vast majority of cases, it's gonna work and won't hurt.

That being said, I think that we should make the "documentation" browse mode more prominent (when you click the "source" button to the right in the browser), and then have methods that rely on internal preconditions (what else is a "private method") be documented a tiny bit better in the future. Something along the lines "if you call this make sure that bambooozle is set to knorzbar". 


Best regards
	-Tobias


> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Useful Latin Phrases:- Furnulum pani nolo = I don't want a toaster.

I don't want to buy this record, it is scratched.

> 
> 
> 



More information about the Squeak-dev mailing list