71104
13-02-2008, 16:44
leggevo questo articolo in merito:
http://discuss.develop.com/archives/wa.exe?A2=ind0011A&L=DOTNET&P=R32820
ma ci sono delle cose che mi perplimono alquanto... :stordita:
Requiring exception specifications would decrease developer
productivity because of the sheer proliferation of exception specifications.
This proliferation proceeds in two dimensions:
The number of members. Modern exception handling allows a
division of work between the code that raises the exception and the code
that handles it. These pieces of code may be separated by intervening code.
E.g., A calls B, B calls C, C calls D, and D raises an exception that is
eventually handled by A. If C# required exception specifications, then each
of A, B, C, and D would have to contain exception-handling related code even
though only A and D do any actual work related to the exception.
mi interessa molto capire il motivo di ciò, ma astenetevi categoricamente dal rifilarmi risposte lamer come "perché C# è una merda Micro$oft suckzz Java 4ever" (se lo fate vi segnalo -.-' ).
The number of possible exceptions. The number of exceptions
is unquestionably large. E.g., any code that adds two numbers could result
in an overflow exception, any code that divides two numbers could result in
a divide by zero exception, and any code that instantiates an object could
result in an out of memory exception.
questo discorso non l'ho mica capito... mica tutte le eccezioni devono essere checked: le eccezioni da lui citate in Java sono unchecked.
voi che ne pensate? :stordita:
http://discuss.develop.com/archives/wa.exe?A2=ind0011A&L=DOTNET&P=R32820
ma ci sono delle cose che mi perplimono alquanto... :stordita:
Requiring exception specifications would decrease developer
productivity because of the sheer proliferation of exception specifications.
This proliferation proceeds in two dimensions:
The number of members. Modern exception handling allows a
division of work between the code that raises the exception and the code
that handles it. These pieces of code may be separated by intervening code.
E.g., A calls B, B calls C, C calls D, and D raises an exception that is
eventually handled by A. If C# required exception specifications, then each
of A, B, C, and D would have to contain exception-handling related code even
though only A and D do any actual work related to the exception.
mi interessa molto capire il motivo di ciò, ma astenetevi categoricamente dal rifilarmi risposte lamer come "perché C# è una merda Micro$oft suckzz Java 4ever" (se lo fate vi segnalo -.-' ).
The number of possible exceptions. The number of exceptions
is unquestionably large. E.g., any code that adds two numbers could result
in an overflow exception, any code that divides two numbers could result in
a divide by zero exception, and any code that instantiates an object could
result in an out of memory exception.
questo discorso non l'ho mica capito... mica tutte le eccezioni devono essere checked: le eccezioni da lui citate in Java sono unchecked.
voi che ne pensate? :stordita: