Archive

Posts Tagged ‘java’

JavaScript for Java programmers

December 7, 2013 2 comments

I just found on my hard drive a talk I gave over two years ago. If you’re a reasonably experienced Java programmer looking for a way to really understand how JavaScript works (especially functions as object, closures, etc.) it may be of help to you:

http://www.youtube.com/watch?v=FGNKoHv7xPY

Categories: Uncategorized Tags: , ,

Exceptions Part 4: What happens if ‘finally’ blocks always execute?

July 2, 2010 7 comments

See the Contents Page for this series of articles

It’s a widespread belief that finally blocks “always” execute, sometimes with hilarious implications.

Last time I reasoned logically that in order for our code to have predictable behaviour, we should stop it running when it becomes clear we don’t understand the state the program is in. As finally blocks are filled with little chunks of our code, it stands to reason that they shouldn’t execute when things get Ugly.

Now I’m going to discuss the specifics of what can go wrong if they are always forced to execute, as they are in a couple of popular languages, C++ and Java (and also by default in CLR-based languages).

Yes, this is a long one, but I’m going to try to start a few language wars, so it should be fun!
Read more…

Categories: Uncategorized Tags: , , , ,