Re: Try/Catch

new topic     » goto parent     » topic index » view thread      » older message » newer message
Spock said...

As you pointed out right from the beginning, cleanup() in the exception handler would have a huge job to do. One of my graphics-based programs does a lot of manipulation at the raw byte level. Routinely blocks of RAM are allocated at 50MB per image or operation. One or two routines also access memory that Windows temporarily allocates. Naturally, memory leaks of such magnitude per unit must never happen.

If an exception occurred x levels down in such a situation the clean up required would be just insane. With SSC this clean up will happen automatically as part of each routine's normal exit strategy. So in this aspect it must be superior to try/catch.

Not really. We already have delete_routine() which is more that sufficient to deal with this.

Also not a problem if we implement try..catch..finally.

Spock said...
jimcbrown said...

Agreed. I'm not aware of Spock's SSC being used anywhere (though I'd love to see some real life usage examples of it).

It's just error codes that have been around forever.

Not so. There are elements to your version of SSC that are new and unique that I've never seen before. It's a lot more than just "error codes" at this point.

Spock said...

Whatever OE might implement I'm sure I won't regret adding SSC to my own compiler.

Cool! Do you have a name for it yet?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu