Comments

nicolas cellier ncellier at ifrance.com
Thu Sep 13 18:06:16 UTC 2007


Jason Johnson a écrit :
> On 9/13/07, Blake <blake at kingdomrpg.com> wrote:
>> On Wed, 12 Sep 2007 15:49:44 -0700, Andreas Raab <andreas.raab at gmx.de>
>> wrote:
>>
>> Not a correct phrasing of my point: One has business with a class if one
>> understands what it is meant to model. It is not Fraction's job to educate
>> would-be-users on the purpose of fractions. If you take the viewpoint that
>> it is, you will fail both to explain fractions and to explain the code.
> 
> I would say you are both have good points.  In the case of fractions
> they can appear when you might not be expecting them (e.g. 10 / 3) and
> therefor may be encountered by little explorers who have learned
> divide but not fractions.
> 
> On the other hand, it might be better served to put the comment at the
> class level, i.e. "this is a fraction class.  for more information
> about fractions follow <link>this link</link>.  This class conforms
> completely to the mathematical description of a fraction".
> 

Yes, that's what i asked.
But then, we can also add information in class side specific to the 
implementation like the Fraction will always be reduced (or tell when 
not), that a minus sign should always be in the numerator etc...

Nicolas




More information about the Squeak-dev mailing list