[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scriptometer: measuring the ease of SOP (Script Oriented Programming) of programming languages
> ... human reasoning about control flow can be a little easier without
> exceptions. With exceptions, every statement potentially contains
> a kind of implicit if/goto, and control flow in a calling procedure
> is decided by the called procedures ...
In a shell environment, one can code
this befringed sort of control flow
cmd && cmd && ..., or
cmd || cmd || ...
but it's more common to just execute
cmd ; cmd ; ...
(in fact, so common that the newline
functions as a sequential separator)
and to only test status at the points
where one is prepared to branch.
> I emphasized "supposed" because of course, this assumes you haven't
> made any serious mistakes in your assumptions about which errors need
> to be handled.
> Programmers are not to be measured by their ingenuity and their logic
> but by the completeness of their case analysis.
So, if the coder has failed to make
the appropriate case analysis, is it
better to silently produce garbage,
or to choke on possibly useful input?
(is this the same question that we
asked in regard to typing?)