[clean-list] Some examples about the Directory library
Jerzy Karczmarczuk
karczma@info.unicaen.fr
Fri, 19 Dec 2003 09:04:07 +0100
Arjen van Weelden wrote:
>> Jerzy Karczmarczuk writes (to the Clean discussion list):
>>
>>> What's wrong with the following?
... getDirectoryContents which generates a "fatal execution error"
> The error is caused by the "\\" you used in "\\Work". The PathDown is
> introduced by this library to abstract from platform dependent directory
> separators. Try changing it to "Work".
Ronny Wichers Schreurs points out that I am not allowed to read DirEntries
if the reported error is an error.
First, thank you very much for your help. I knew I could count on you.
Then, I confess that I knew that \Work did not exist.
And I confess that I read the documentation where you precise that entries
are valid only if there are no errors reported.
I wanted to make this suicidary experiment in order to see what's an invalid
entry, since the data structures describing directories do not provide
for pathologies.
And I got struck by Jupiter! RWS says that he doesn't like this design.
I would say more, I find it not really acceptable. Data structures which
explode under your nose are against the Golden Functional Way of Life.
Why not introduce ErroneousEntry case?
At least then, if the user is reckless enough not to test this case, he/she
will get a clean error diagnosis, and even a possible warning that the
program admits a failure because not all alternatives are tested.
We will survive this, of course, But, please, reconsider the design of this
module.
Thank you once again.
I have still two questions pending, and a new one.
1. What does the compiler do when it does apparently nothing for 7 seconds
before starting its dance with a 10 lines long program, and why some-
times this latency time is much shorter, and sometimes not.
2. Does the Clean Respectable Team still think about the concurrency?
3. A new one, but related. Suppose I want to use Clean to process synchro-
nously some input and to produce some output with the use of timers,
working with small chunks. I would need to collect the garbage incremen-
tally in order to avoid pausing. Will it ever be possible, according
to the current vision of Clean authors?