Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 29th, 2005, 5:57 AM   #41
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I think it's a good mechanism to use for extraordinary errors or in situations where you want some class of errors to be handled from a central location. I would never use it in place of simple status checks.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Oct 29th, 2005, 9:35 AM   #42
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,011
Rep Power: 5 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by D-Ferg27
the one on page 4 somewhere in the middle. Hello world.
Very Very helpful for a biginner to C++ like me. My programming class teaches visual basic but i heard that is teaches bad programming habits so i don't want to focus on that too much so i rather start learning C++ now. In the second half of the year my class turns into an andvanced computer programming class in which we will learn Java . Im in 9th grade and my goal is to make it to MIT. So i think its best for me to study everyday from now rather than trying cram stuff into my brain in like 11th grade.

If you can learn C++, Java will be a total breeze. You'll have to learn some different ways of doing things, and will have to give up some things you may have become attached to (like pointers, destructors, and operator overloading), as well as learn entirely new library functions (err, classes and methods, sorry), but all in all, C++ is a very good foundation for Java. This makes sense, since Java stole 95% of its syntax and semantics from C/C++.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old Oct 29th, 2005, 9:35 AM   #43
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,011
Rep Power: 5 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by DaWei
Quote:
Originally Posted by MrSmiley
DaWei, what is your take on c++'s try...catch excetion handeling?
I think it's a good mechanism to use for extraordinary errors or in situations where you want some class of errors to be handled from a central location. I would never use it in place of simple status checks.
I agree with this 100%. Exceptions are fine when the error is caused by something completely beyond your control, such as hardware failure. However, exceptions are also an order of magnitude more expensive from an efficiency standpoint than a simple compare, and as such, shouldn't be used as a replacement for checking return values.

This is one of my main beefs with Java. The language designers opted to use exceptions for nearly all error conditions; you see things like a method with a void return type throwing an exception, where returning a success/failure code would seem to be much easier. Of course, this isn't a flaw of the language itself, but rather of the design of the standard libraries.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:59 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC