Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between C++, Java and JavaScript exception handling?

They are very different kind of languages and the way they handle exceptions might be rather different.. How is exception handling implemented and what are the implementation difference within these languages?

I am asking this question also because I noticed that C++ exception handling seems to be very slow compared to the JavaScript version.

like image 214
Dpp Avatar asked May 25 '10 11:05

Dpp


People also ask

What is exception handling in C and Java?

Exception handling in java. Exception handling in C++ Only throwable objects can be thrown as objects. All types can be thrown as exception. In java, finally is a block that is executed after try catch block for cleaning up.

What is the difference between C and JavaScript?

JavaScript is interpreted and sometimes compiled at runtime with a just-in-time (JIT) compiler. C is statically typed. JavaScript is dynamically typed. C requires programmers to allocate and reclaim blocks of memory.

What is the difference between Java and JavaScript?

Key differences between Java and JavaScript: Java is an OOP programming language while Java Script is an OOP scripting language. Java creates applications that run in a virtual machine or browser while JavaScript code is run on a browser only. Java code needs to be compiled while JavaScript code are all in text.


1 Answers

The most detailed answer I found regarding Exception handling and performance/implementation is on this page: http://lazarenko.me/tips-and-tricks/c-exception-handling-and-performance

like image 136
Dpp Avatar answered Oct 18 '22 03:10

Dpp