[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



Daniel Weinreb <DLWeinreb@attbi.com> writes:

> Actually I'm not really crazy about either of the examples below because they
> are both based on the bug-prone "programmer had better to remember to
> check the error code" style rather than using exceptions.  I don't see any
> reason
> why the usual pro-exeception-system arguments should not apply to scripts.

because fail-through is not always the worse?

Based on my experience, many errors are better ignored than be
non-catched exceptions which kill execution.

In perl, i have *many* code like: eval { doit() }

So IMO un-handled exceptions are sometimes worse that silently
failing. 

It's again a "Python (everything in its library raise an exception) vs
Perl (nothing in its library raise an exception)"

                                    python    ruby   perl
out of bound array indexing read   exception  nil    undef
out of bound array indexing write  exception  ok     ok
out of bound hash access read      exception  nil    undef
out of bound hash access write     ok         ok     ok