Converting C to Delphi - Guidance -


I am converting low level C library to Delphi.

  1. I think there are so many people that I think that it is normal in C world. I think I am safe to throw them out. The integer is only 32 bits. What do you think?

  2. If I change it into object etc. what can be the overhead of OOP?

  3. Similarly, I want to know the cost of trying .. Finally and the exception.

Give me a tip that you think will be useful. Likewise, I want to know the cost of trying. Finally and the exception.

Try the cost ... In the end, it is careless except for tight ends (keeping them around and not in the loop)

   

The cost of a try ... Apart from this, there is a lot more to use them to answer those exceptions, but when you can actually do some meaningful action such as the exception Because of the counter, working on certain specific information that will be lost at a higher level in your app, etc. Otherwise, propagate exceptions to the caller of your code, so that it can (finally) be caught at a more general level.

Do not allow exceptions to escape from your application or library or any threads within it.

"eat" is never an exception by leaving an empty except the blocks

  except ...; Actually there is only one type of situation where it makes sense: catching exceptions in code which logs exceptions ... and then add a comment to say Why are you eating exception? / P> 

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -