[clean-list] A minor issue with usability?

Alan Carlyle alan_carlyle@iprimus.com.au
Mon, 3 Nov 2003 23:58:20 +1100


Hi All!

I've recently returned to using Clean after a few years hiatus; mainly as an
antidote to the .NET  development I earn a living with ;}

Now that I've returned I am surprised to see that a rather ugly 'feature'
has not been corrected. Namely the "press any key to exit" and intrusive
pause this forces on us for programs compiled for the console.

This is a major problem as it prevents me from using Clean to write small,
fast programs with output that can be run in scripts i.e. Bash (Cygwin &
Linux)
and Win' Batch files.
It also prevents the elegant use of Clean programs as functional ( ;-) )
building blocks, where one program streams it's output as input to another,
as is
often done with the Unix/GNU set of simple program development tools.

With the "press any key to exit" feature it is all but impossible to write a
program that will execute the same and present the user with _exactly_ the
same behaviour as the very simple C program below:

/*BOF*/
/* Compiled under cygwin on XP Pro using GNU gcc.*/

#include<stdio.h>
int main()
{
    printf("Hello Clean.\n");
    printf("\tCatch me if you can....");
    return 0;
}
/*EOF*/


This is a _BIG_  drawback to the widespread use of Clean.

I was keen on the idea of rewriting some of the GNU tools in Clean (just for
the fun of it)
    e.g. wc, sort, uniq, cut, tr, head, tail, diff, patch,  cvs, ...
Yet with the "press any key to exit" feature it isn't even possible to write
a program that does exactly the same thing as this;
        wc --help

I also had in mind a personal project of extending Clean's functionality
down
closer to the OS, with the goal of reaching a level where it isn't necessary
to write
auxilliary low level support in C.

Sorry to go on a bit but this is IMHO a serious problem which is preventing
an otherwise wonderful language from proving to all those Turing machines
out there that Turing was right when he said his theory and Church's were
equivalent and equally powerful. Let's see if this can be proved in practice
as well as theory!!

Could the developers of Clean please remove/optionalise this feature, and if
possible, supply a patch we can apply to our current versions.


Kind Regards,
    Alan Carlyle

P.S. If there are any Moral, Ethical, Legal, Religous or other historical
reasons for the
    current state of affairs I would be very interested in knowing what thay
may be and
    apologise in advance for any offence I may have caused.