[Pharo-project] What is a well documented class?

Schwab,Wilhelm K bschwab at anest.ufl.edu
Sun Apr 24 18:45:35 CEST 2011


Public/private categories would a lot of sense if methods could belong to more than one category.  Dolphin allows that, and it's *really* nice.




________________________________________
From: pharo-project-bounces at lists.gforge.inria.fr [pharo-project-bounces at lists.gforge.inria.fr] On Behalf Of Stéphane Ducasse [stephane.ducasse at inria.fr]
Sent: Sunday, April 24, 2011 12:37 PM
To: Pharo-project at lists.gforge.inria.fr
Subject: Re: [Pharo-project] What is a well documented class?

On Apr 24, 2011, at 6:49 PM, Alexandre Bergel wrote:

>> give a try and see. I think that this is important.
>
> Yes it is.
>
>> We can even publish something out of it :)
>
> That's a side effect that cannot be avoided :-)

;-)
so even better.


>
> Alexandre
>
>>
>> On Apr 24, 2011, at 6:17 PM, Alexandre Bergel wrote:
>>
>>>>> - each public method belongs to a method category named public*
>>>>> - each private method belongs to a method category named private*
>>>>
>>>> Others here may disagree -- and the dreary of legislating and
>>>> enforcing conventions aside -- but I strive (usually with success) to
>>>> move all privately-used methods to one or more delegates.  One class's
>>>> private method is just another's public???
>>>
>>> A private method may have to access instances variables. Moving the method to another class may be difficult sometimes.
>>>
>>>>> - other methods are considered as "package visible", meaning that they belong to a category that does not begins with 'private' or 'public'
>>>>
>>>> Again, I sympathise with facing the visibility problem, but I don't
>>>> trust that conventions will be upheld by either end, so I tire of
>>>> following them.  Replace Pharo/Squeak categories with Newspeak
>>>> modules; replace Pharo/Squeak protocols with traits (stateless,
>>>> please); I'll be the first in line.
>>>
>>> I do not think this should be enforced. It is easy to infer method visibility with a set of well defined scenarios, for example the one that comes in unit tests.
>>>
>>> Cheers,
>>> Alexandre
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>





More information about the Pharo-project mailing list