[erlang-questions] illegal guard expression: filelib:is_dir(H)

Richard O'Keefe <>
Tue Feb 16 05:08:44 CET 2010


On Feb 16, 2010, at 2:36 AM, Michael Turner wrote:

>
>> The reference to Guantanamo is, um, hyperbolic, to put it mildly.
>
> I plead guilty to Argument by Reference to Wikipedia.
>
> (A mitigating circumstance: I was once told by a friend that he'd  
> heard
> Dijkstra say, haughtily, at a conference in Asilomar, "'Run a
> program'?!  Why, I haven't *run* a program in years!"  Well of course
> not.  How silly.  Why run programs when you can be proving them  
> correct
> instead?)

Let's see, you have a second-hand report of *part* of a conversation,
and you base your judgement on that?  What had the other person said
to him?  What was the conversation about?  How do you know that the
next sentence wasn't "I've often had a computer carry out my plan"
or something of the sort?

I've just been reading an article in CACM which is simultaneously
inspiring and deeply saddening.  The article is about Coverity.
The inspiring part is that they've built a wonderful tool for
checking C code.  The deeply saddening part is the refusal of many
people to believe that their grossly nonstandard code is anything
but perfectly legal C.  One example sticks in my mind:

	int a[2], b;
	/* context: sizeof (int) is 4. */
	memset(a, 0, 12);

Coverity pointed out the bug.  The customer said "no no, your tool
is broken, I *meant* that because a and b are side by side."
The fact that the C standard explicitly denies any relationship
between the addresses of a and b, and that there have been (and
for all I know may still be) compilers that sorted globals,
putting the small ones first so it had a fighting chance of
being able to address most of them with a single register, which
compilers would have guaranteed that a and b were NOT adjacent,
all of this was of no importance to the customer.

He had RUN his program, you see, so he KNEW it was right.

If you want to quote Dijkstra, quote this:

	I would therefore like to posit that computing's
	central challenge, "How not to make a mess of it,"
	has not been met.  On the contrary, most of our
	systems are much more complicated than can be
	considered healthy, and are too messy and chaotic
	to be used in comfort and confidence.  The average
	customer of the computing industry has been served
	so poorly that he expects his system to crash all
	the time, and we witness a massive worldwide
	distribution of bug-ridden software for which we
	should be deeply ashamed.
By the way, this doesn't contradict Armstrong's "Let it crash"
dictum.  Joe is talking about _components_ hidden inside a
system crashing.  Erlang *systems* aren't supposed to crash,
which is why Francesco Cesarini and Simon Thompson stress
early on in their wonderful book that processes should be
watched by some other process.

Whether Dijkstra personally ever ran a program or not (and he
devised the implementation techniques at the heart of Java),
his _notation_ deserves a reasoned responds on its own merits
for what it is, not what it might be imagined to be.




More information about the erlang-questions mailing list