effect of free()

Scott Amspoker scott at bbxsda.UUCP
Thu Sep 21 02:37:11 AEST 1989


In article <591 at augean.OZ>  writes:
>
>It violates the law of least surprises to have variables suddenly made
>inaccessable by being a call by value argument to a function.
>
>C used to be a language where I felt comfortable because I had a pretty
>good idea of its basic principles...

This is why there has been an excessive amount of noise on this thread.
Programmers are being told that merely *handling* an invalid pointer could
cause their program to crash.  In the legal world this is called "prior
restraint".  This is where you forbid somebody from doing something not
because it is wrong but because you believe it could eventually *lead* to
something wrong.  Ideas like that don't go over very well in a free society.
Even though very little production software, if any, would *ever* get zapped 
by this pointer thing; there is a fear that our old friend, C, has become a 
Marxist dictator (for our own good of course).  So, we are seeing posting 
after posting expressing disbelief.  Many readers are waiting for someone 
to say it's all a joke.

Nobody wants to be told that their well-written code will suddenly fail.
It is too bad that bad coding examples have been use to make arguments.
I guess that's what happens when you try to come up with trivial examples.

Fortunately, the real world is market driven.  I've said it before (and
got flamed for it) and I'll say it again:  If you don't like it, don't
buy it.  You have to decide for yourself how reasonable your expectations
are.  If you consistantly have trouble porting C code then you have a 
problem.  If, say, one compiler out of 20 gives you a bad time then
screw it.  Everything may be black and white in computer science but
not in business.  On rare occasion, our expectations have not been met.
I doesn't matter who's right or wrong, it is purely a business decision.

The masses will ultimately decide what the de facto standards will be.
A compiler vendor will either please the masses or it won't.  If you
think that the masses are stupid or beneath you then that's good.  That
means your competition is stupid and beneath you.

I know that comp.lang.c is more a place for theoretical discussion rather
than real world discussion, but when readers see their gigantic investment
in C code going out the window, the real world quickly enters into it.

But remember - you *do* have some voice in this.

-- 
Scott Amspoker
Basis International, Albuquerque, NM
(505) 345-5232



More information about the Comp.lang.c mailing list