Talk:Arithmetic/Rational: Difference between revisions
Content added Content deleted
(→Too long: Also agreed.) |
(→Too long: now shorter.) |
||
Line 7: | Line 7: | ||
:Agreed. This task should simply be about the definition of a rational type and maybe a couple of helper functions (like reduction). There should be no operator definition in this task. That is covered [[Matrix_exponentiation_operator|elsewhere]]. If you still want the operator functionality, then named functions would be preferred so the task isn't restricted to languages with operator definition. --[[User:Mwn3d|Mwn3d]] 13:47, 13 February 2009 (UTC) |
:Agreed. This task should simply be about the definition of a rational type and maybe a couple of helper functions (like reduction). There should be no operator definition in this task. That is covered [[Matrix_exponentiation_operator|elsewhere]]. If you still want the operator functionality, then named functions would be preferred so the task isn't restricted to languages with operator definition. --[[User:Mwn3d|Mwn3d]] 13:47, 13 February 2009 (UTC) |
||
::Actually, if you want the operator functionality, you should simply say "provide a means to do ''blah''," so that languages can use their idiomatic approach, be it operator overloading, function calls, etc. --[[User:Short Circuit|Short Circuit]] 16:06, 13 February 2009 (UTC) |
::Actually, if you want the operator functionality, you should simply say "provide a means to do ''blah''," so that languages can use their idiomatic approach, be it operator overloading, function calls, etc. --[[User:Short Circuit|Short Circuit]] 16:06, 13 February 2009 (UTC) |
||
I just changed the task definition, and pruned the code and examples |
|||
back to the minimum required. I suspect that the original code in |
|||
Python would be really short as python can leverage off duck typing. |
|||
However ALGOL 68 requires the programmer to MANUALLY define ALL associated |
|||
assignment operators (e.g. +:=, -:= etc) together with ALL the UPPERCASE |
|||
equivalent operator, e.g. PLUSAB, MINUSAB etc (to provide portability |
|||
to wrist watches and main frames). The net effect is an explosion of |
|||
operator definitions. [[User:NevilleDNZ|NevilleDNZ]] 21:53, 13 February 2009 (UTC) |