[clean-list] Process starting

Marco m.kesseler at xs4all.nl
Thu Mar 9 17:26:24 MET 2006


>>  > (one more thing: don't use so many #!'s, they are hardly ever necessary)
>> Yes, thanks, but my problem is a little bit complicated as my small 
>> example shows that.
>> I have to call a lot of external C functions, and must implement a real 
>> sequence, which
>> cannot be without #! :)
> >
> > Thank you for your answers,
> >
>
>Usually, you do this by using environment passing (using the World or 
>another state) and using # . It forces a sequence based on the data 
>dependency of the state. This works better that (hoping to) force 
>evaluation using #!, since its semantics are not well defined. If you're 
>not careful, #! does not even enforce the evaluation that you 
>want/expect! This is something I've observed from myself and from other 
>Clean programmers. Maybe you're an expert and all this does not apply to 
>you. It was just a suggestion to improve your Clean style.

Hi Arjen,

I am aware that this is somewhat off-topic for the subject at hand, 
but I hope that you appreciate what I want to say nonetheless.

What I am trying to point out, is that it is often better if 
programmers explicitly write down their intentions, even if the 
language does not require it. It makes sense to write down types, 
even if the compiler can derive them. This becomes important if 
others have to understand the program.

So, if someone uses #!, then everyone knows that the programmer is 
saying "it is important that this be evaluated now". It does not 
matter whether the compiler can figure this out too. It matters that 
other programmers are careful when changing this particular part of 
the code.

Apart from that, it is not always that easy, or natural to drive a 
"procedure" (as opposed to a function) via data dependencies alone.

And finally: given that endless debates have occured over the right 
way to place curly brackets in C, I suspect that there is no such 
thing as the "right" Clean style.

cheers,
Marco



More information about the clean-list mailing list