Regarding literals and loop indices modes / programming friction

jpl jpl.algol68@gmail.com
Thu Jan 29 17:54:09 GMT 2026


Mohammad-Reza,

Fantastic news!  I appreciate the two of you taking the time to consider this.

Also, thanks for your initial reply to the list on this topic which
pointed out how the monadic operators makes this possible.  (So, it
essence this is all your doing.  I remain blameless here ;^)

James

On Thu, Jan 29, 2026 at 12:23 AM Mohammad-Reza Nabipoor
<mnabipoor@gnu.org> wrote:
>
>
> Hi James.
>
> On Sun, Jan 25, 2026 at 05:19:14PM +0100, jpl wrote:
> > 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.
> >
>
>
> Last night we discussed this over Jitsi (me and Jose) and sounds like a
> reasonable thing to do, so you'll this "some day" :)


More information about the Algol68 mailing list