[clean-list] files unique or not unique for reading?
Arjen van Weelden
A.vanWeelden at cs.ru.nl
Mon Jul 11 13:57:18 MEST 2005
Hello,
This is because f* operations can also be used on writable files,
although it is not common to read from and write to the same file.
If you only read from files, you can use sfopen or fshare and the sf*
operations (see page 204).
The main advantage is that you can explicitly close a *File (there is no
sfclose). Ihe type system also enforces single threaded use of the
*File, preventing accidental sharing, which may prevent some kind of
programming mistakes.
regards,
Arjen
Wolfgang Jeltsch wrote:
> Hello,
>
> Functional Programming in Clean, Part I as published via Clean's website, says
> on page 113: "The file from which characters are read is not required to be
> unique since no destructive update is involved in reading." However, on page
> 203, the File argument and File part of the result of freadc are declared as
> unique. Why?
>
> Best wishes,
> Wolfgang Jeltsch
> _______________________________________________
> clean-list mailing list
> clean-list at science.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/clean-list
More information about the clean-list
mailing list