Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?

Comment Re:The third option (Score 1) 536

I think it is a bad design decision to impose static checking on declared 'throws' statements, because that forces routines to catch stuff that they can't handle, or declare a meaningless list of everything every called routine could ever throw.

It's good design decision in this case. Consider this:
You call library function A().
Library function A() calls some function B(), but you don't know this (closed source).
Library function B() can throw some error, how can you know it? Either it should be catched in A or declared as thrown in A, so that you know that this exception CAN be thrown from A.

Comment Re:The third option (Score 1) 536

Not only telephony. Also in erlang you can make stateful servers, you just don't have shared state. Instead you send messages about data changes between processes. It's like many people talking and updating their knowledge of some situation.

Comment Re:The third option (Score 1) 536

It's only philosophy. In erlang you CAN catch errors (there is even try ... catch and throw). But typically you are encouraged to write programs so that when something fails, you just restart it. I've recently written a server in java which had errors and null pointer exceptions, but it survived, just logged the errors and restarted connection, so you CAN write something like this in other languages. Erlang just gives you some tools to make this even easier.

Slashdot Top Deals

It is now pitch dark. If you proceed, you will likely fall into a pit.