Regarding literals and loop indices modes / programming friction
jpl
jpl.algol68@gmail.com
Sun Jan 25 16:19:14 GMT 2026
Regarding the SIN monadic op mentioned by Mohammad-Reza:
On Sun, Jan 25, 2026 at 4:07 PM Mohammad-Reza Nabipoor
<mnabipoor@gnu.org> wrote:
>
> Another way is to define SIN/COS as monadic operators, and then enjoying the overloading
> capabilities:
>
> ```algol68
> op SIN = (real r) real: sin (r),
> SIN = (long real lr) long real: long_sin (lr),
> COS = (real r) real: cos (r),
> COS = (long real lr) long real: long_cos (lr);
> ```
Is there any reason why this would not be done for all such
(reasonable) mathematical functions (at the language level)?
I mean, could not our present day "sin" be renamed to "sin_real", and
then create a monadic operator named "sin" which would allow all
variants of real modes? It appears it would provide broad benefits to
the user.
Probably a silly question. But I am curious.
/James
More information about the Algol68
mailing list