Linked by David Adams on Wed 14th Dec 2011 16:01 UTC, submitted by fran
Internet & Networking PHP's popularity and simplicity made it easy for the company's developers to quickly build new features. But PHP's (lack of) performance makes scaling Facebook's site to handle hundreds of billions of page views a month problematic, so Facebook has made big investments in making it leaner and faster. The latest product of those efforts is the HipHop VM (HHVM), a PHP virtual machine that significantly boosts performance of dynamic pages . And Facebook is sharing it with the world as open-source.
Permalink for comment 500222
To read all comments associated with this story, please click here.
RE[5]: Database
by Alfman on Thu 15th Dec 2011 20:25 UTC in reply to "RE[4]: Database"
Member since:


"If you don't want to handle the exception locally you just add throws Exception after the method declaration. and catch the exception in the calling method."

This is exactly the wrong way to handle it IMO. If every function needs to add "throws Exception", then there's absolutely no benefit at all. By casting to the base exception class, we actually loose the information about the specificity typed exceptions which are thrown and we force calling functions to handle generic exceptions instead of specific ones.

I understand that checked exceptions are a highly opinionated topic, and I have no problem with devs who like them. My point was that forced exception handling in Java is awkward for rapid prototype workflows where it makes far more sense to focus on normal code paths first, and then add exceptional cases at later stages of development as needed.

Reply Parent Score: 2