[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



Pixel wrote:

>Based on my experience, many errors are better ignored than be
>non-catched exceptions which kill execution.
>
I am not sure what you are saying here, because many people use the 
words "error"
and "exception" in somewhat different ways than the ways that I, 
personally, think
are the best ways.  There are errors that are not exceptions and there 
are exceptions
that are not errors.  

>In perl, i have *many* code like: eval { doit() }
>
Sometimes that's appropriate.  On the other hand, that's also a great way
to cover up bugs and to make it impossible to figure out what's going on
when a bug occurs.

>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
>
All of those sets of decisions are just fine.  What constitutes an 
"exception" is
a judgement call that every designer of a language or library needs to make,
usually for each API, sometimes many times for each entrypoint of each API.

>