I believe the reason for not wanting to throw exceptions unless really needed is that exceptions (and their handling) are relatively expensive and resource intensive operations. Most languages when exceptions are thrown do a lot of runtime stack analysis to, among other things, get a full stack trace. There are many research links on the interweb explaining how expensive it is in whatever language you happen to be using, but here is the first link I found: http://stackoverflow.com/questions/1282252/how-much-more-expensive-is-an-exception-than-a-return-value
In the case of the.net runtime, throwing an exception was > 1000x as expensive as using a return value, in processing time.
And why would anyone care? Is there a benchmark somewhere on how many errors per second your program can process? If you unplug the ethernet cable is it important to tell the user that their session is gone in 1 microsecond rather than 10?
Exceptions should NOT be used for 'normal' errors. They should be used for events that are, well, exceptional. A healthy program should NEVER raise an exception, but may deal with a lot of error conditions.
[citation needed]
What is the basis of this strange belief? The non-error case should be simple and readable, not cluttered with tests for seldom-occurring errors. Putting a try-catch block around it pulls the messy error code out of it and is simpler to read and debug than inline code. Never worry about performance of error-handling code.
No. They just need to specify that it only be used in areas with stupid criminals. Then its the hotel's problem for not following directions. Kind of like all electronic products say "not for use in life-support applications" so if anybody gets killed due to the part failing, they can claim it was used improperly.
Every internet business would buy server space in NH or AK with no sales tax and declare that their headquarters if it was by seller. I think it has to be on the ship-to state. A program for calculating sales tax based on street address would not be very difficult.
HIPAA rules apply to "health care providers" which is even more general. It includes doctors, nurses, EMTs and even medical device manufacturers under some circumstances.
Should we tell these people about 1KB Roguelikes which implement an entire adventure game in a single line with 1024 characters? Probably not or they'd have an orgasm.
Conway's Life used to be popular for writing one-liners, too.
The problem is that they can't make them TOO close. I think it was New Jersey that made some tokens that were the same size as New York subway tokens, which cost a lot more. This led to high sales in New Jersey and a loss of revenue in New York until they phased out tokens.
My grandmother drove a 60's Oldsmobile. The speedometer indicator changed from green to yellow when you hit dangerous speeds (35 mph). Of course, I never saw that when she was driving. There was a rumor that it also could change to red at even higher speeds.
I believe the reason for not wanting to throw exceptions unless really needed is that exceptions (and their handling) are relatively expensive and resource intensive operations. Most languages when exceptions are thrown do a lot of runtime stack analysis to, among other things, get a full stack trace. There are many research links on the interweb explaining how expensive it is in whatever language you happen to be using, but here is the first link I found: http://stackoverflow.com/questions/1282252/how-much-more-expensive-is-an-exception-than-a-return-value
In the case of the .net runtime, throwing an exception was > 1000x as expensive as using a return value, in processing time.
And why would anyone care? Is there a benchmark somewhere on how many errors per second your program can process? If you unplug the ethernet cable is it important to tell the user that their session is gone in 1 microsecond rather than 10?
All code is just assembly language in other clothing.
Exceptions should NOT be used for 'normal' errors. They should be used for events that are, well, exceptional. A healthy program should NEVER raise an exception, but may deal with a lot of error conditions.
[citation needed]
What is the basis of this strange belief? The non-error case should be simple and readable, not cluttered with tests for seldom-occurring errors. Putting a try-catch block around it pulls the messy error code out of it and is simpler to read and debug than inline code. Never worry about performance of error-handling code.
Yup. Errno has been around as long as UNIX system calls, so there are really 3 common mechanisms, not 2 as the article says.
I believe you, AC. I also believe that video where the woman unlocks the car with a tennis ball.
No. They just need to specify that it only be used in areas with stupid criminals. Then its the hotel's problem for not following directions. Kind of like all electronic products say "not for use in life-support applications" so if anybody gets killed due to the part failing, they can claim it was used improperly.
Everybody has different kbd likes but I still have my IBM model M. Built like a tank.
Up in the attic somewhere is a 6802 microprocessor card (similar to the Kim-1) with a Lisp interpreter in PROM.
Every internet business would buy server space in NH or AK with no sales tax and declare that their headquarters if it was by seller. I think it has to be on the ship-to state. A program for calculating sales tax based on street address would not be very difficult.
HIPAA rules apply to "health care providers" which is even more general. It includes doctors, nurses, EMTs and even medical device manufacturers under some circumstances.
Should we tell these people about 1KB Roguelikes which implement an entire adventure game in a single line with 1024 characters? Probably not or they'd have an orgasm.
Conway's Life used to be popular for writing one-liners, too.
Heh. This will use up your whole roll of teletype paper
10 PRINT "HELLO, WORLD"
20 GOTO 10
And just yesterday (and I mean yesterday), a self-proclaimed smart person was telling me that 3D printers would never be able to make anything useful.
How about a bikini
Cool. I just need to fly to Belgium.
When is my local Kinko's or Staples going to have a 3D printer where I can take my USB stick with an Autocad file?
That's why all new transit systems use cards.
The problem is that they can't make them TOO close. I think it was New Jersey that made some tokens that were the same size as New York subway tokens, which cost a lot more. This led to high sales in New Jersey and a loss of revenue in New York until they phased out tokens.
The US has been officially metric since 1969. Compliance is of course voluntary.
Here's the geekiest solution for that.
The second mouse gets the cheese.
I think it was the vending machine lobby that made them continue to print bills. Most won't take $1 coins.
And it would be confusing to call them fifths.
Nothing is stopping you from buying gold.
Stereo is overrated.
My grandmother drove a 60's Oldsmobile. The speedometer indicator changed from green to yellow when you hit dangerous speeds (35 mph). Of course, I never saw that when she was driving. There was a rumor that it also could change to red at even higher speeds.
There's a 12AU7 burned out in my radio, so I can't use it for anything right now.