Re: pure procedure



On 04/22/2011 08:56 PM, Richard Maine wrote:
<nmm1@xxxxxxxxx> wrote:

Well, yes, but that's not the REAL gain, which is how much they
can speed up debugging in large programs. If you see a PURE
procedure, (a) you can be certain that it isn't going to have a
strange (legal or illegal) side-effect on some other data and
(b) you can put extra calls in your diagnostic statements without
affecting the results.

Of course, lying to the compiler and tricking it into believing your
lies, as the OP was suggesting, completely defeats that object.


Indeed. Nobody forces you to use pure procedures. If you use them, presumably it's because you *want* the assurance of a side-effect free procedure.

Daniel.

.