Anonymous  Login  09272020 16:19 UTC 
Main  My View  View Issues  Change Log  Docs 
Viewing Issue Simple Details [ Jump to Notes ]  [ View Advanced ] [ Issue History ] [ Print ]  
ID  Category  Severity  Reproducibility  Date Submitted  Last Update  
0007324  [Squeak] Kernel  minor  always  032809 01:29  010513 21:20  
Reporter  wiz  View Status  public  
Assigned To  
Priority  normal  Resolution  fixed  
Status  closed  Product Version  4.3  
Summary  0007324: Fractions do not give useful access to denominator and numerator  
Description 
Currently Fraction implements denominator and numerator as private methods. What about if you actually want to access the denominator of a fraction? 

Additional Information 
Everything in squeak is an object... ...in a community of messages. Dealing with fractions or more likely fractions/integers I would like to have access to useful information like the actual denominator. And I would like the messages to return accurate and correct results Evaluating 2 reciprocal + 2 reciprocal denominator prints answers totally unexpected and nonsensical. so does 4 reciprocal + 4 reciprocal denominator even though the latter is unequivocally a fraction. Well the method warns me that is to be expected and that that the methods are private. But is it a reasonable use case? private language should not usurp useful words that can have interesting public meaning. it would be easy enough to use privateDenominaor and privateNumerator leaving the more common words to implement their more common meaning. Worse of course is asking an integer for its denominator creates an error rather than providing a reasonable answer like 1. So questions from my curiosity. 1) What are the use cases for Fractions. 2) can we make denominator and numerator public and make other numbers or at least integers polymorphic with Fractions in that respect? 

Attached Files  

Mantis 1.0.8[^]
Copyright © 2000  2007 Mantis Group
51 total queries executed. 36 unique queries executed. 