[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Zeroes and infinities



Peter Henderson <petercbh@xxxxxxxxxxx> wrote:
.
The problem is with the large number of programs that don't want to
handle them, and where going near a branch cut is an error.

This is a fault at the algorithm level.  It is the programmers job to 
deal with this.

Well, I remember when (many) compiler writers said that it wasn't
a compiler's job to issue diagnostics - it was the programmer's
job to check that their code was correct before compiling it.

Any engineer, in any branch of engineering (except software),
knows that it is critical to design systems for likely mistakes
and even abuse, and ensure that they detect them and fail fairly
gracefully.  I am old-fashioned, and believe that should apply to
software as well.

If the functions issue a diagnostic on the INITIAL failure, it is
usually easy to find the original mistake.
  
Well I supose one could ask programming environments to provide special 
purpose versions that do just this.  But would it really help?  Such a 
facility could only be triggerred by hitting the branch point exactly, 
whereas the error occurs when the branch point is crossed, a far more 
likely scenario, and this would require the functions to monitor the 
sequence of calls and determine whether consecutive calls constitute a 
branch crossing.  Really, this is the programmers job.

Well, it did, when it was the standard behaviour.  Not a lot, but
it was better than nothing.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1@xxxxxxxxx
Tel.:  +44 1223 334761    Fax:  +44 1223 334679

754 | revision | FAQ | references | list archive