Exceptions represent a special case in many programs: they have their own execution path and the program can jump into this path any time. Is this ideal, though? This depends on the size of the try block (or whatever the name); this might cover several statements and debugging a runtime exception stops being fun quickly. A better way to achieve safe error handling could be to integrate errors in the results of a function call—a practice that can already be seen in C functions where the parameters do the data transfer and the return code indicates success/failure. Newer, more functional paradigms suggest something akin to the Result type in Rust—which comes with functions to elegantly deal with the various outcomes. This makes the errors an expected outcome of a function and enables smooth error handling without additional if conditions for...
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia