Thread: C++ Annotations

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    > AFAICT their significance has to do with calling destructors properly and the fact that constructors can't return NULL
    AFAIK it also resets the stack...rolling back changes until the place where the 'catch' block is there.

    >How meaningful is a "tidier" mistake?
    I'd say..very much. I'm currently trying to write a small lisp interpreter...and exceptions made writing the REPL a joy. (Of course it would be possible to do without such mechanisms... but the code would look like a huge sack of potatoes..instead of the 25 relevant lines I have now)
    [I'd post the code on Tech Board/GD when done.. and you'd see what I mean]

    >In C, what you can't do with normal if (!work) error handling cascades can be done with assert()
    Fine when debugging...but not when you have any intention of letting the program recover.


    > But I don't see why C++ has to justify its syntax in relation to C.
    Human nature. (like those 'insightful' articles about iGadgetFoo being 0.0025% thinner than normalGadgetBar )
    Last edited by manasij7479; 11-30-2011 at 11:36 AM.

Popular pages Recent additions subscribe to a feed