The whole Channel thing
Jose E. Marchesi
jemarch@gnu.org
Sat Feb 7 23:58:55 GMT 2026
> Good evening once again,
>
> I have this sense of a few things emerging from the murk, but I'm not sure
> I'm fully appreciating them. mode Channel is one of those things.
>
> I am beginning to think that instances of mode Channel are entirely and
> completely defined in the standard prelude and there is no intent to allow
> the programmer to define more channels on her own. I base this opinion on
> a few things:
>
> 1. Mountbatten's algol68toc translator defines a whole slew of Channel
> instances, including the keyboard, the environment variables, the
> arguments, and others.
>
> 2. Our dear mentor McGettrick begins his discourse on Channels with the
> following:
>
> Channels correspond to the physical devices (i.e. peripherals) attached to
> a computer and their precise form will depend on the particular ALGOL 68
> system.
>
>
> 3. Try as I might, I have found nowhere an example of a declaration of a
> Channel (nor a ref Channel) outside the standard prelude.
>
> So with that all in mind, I don't see a whole lot of point to defining any
> Channel instances other than:
>
> standin channel
> standout channel
> standback channel
> standerr channel
>
> for a "first attempt" at creating a working transput library.
>
> Does anyone object to that approach? If so, an alternative would be to
> look at Mountbatten's list of Channel instances to pick out what might be
> necessary (again for a first attempt).
I totally agree with you on this: the list of channels is fixed by the
implementation and not user-defined.
However, it would be easy to provide user-defined channels, and probably
useful. In Sian's QAD implementation, a channel provides:
- A set of sysprocs, that provides an implementation of the buffered
bytes I/O: read byte, write byte, sys-level-open, sys-level-close,
etc,
- The "possibles" allowed in books opened through this channel: bin
possible, put possible, get possible, set possible, reidf possible.
- A set of "ioprocs" that contain the *mended states described in van
vliet.
I like QAD. It follows van Vliet.
More information about the Algol68
mailing list