Комментарии:
The bad thing with exceptions isn't necessarily that they're very resource intensive, or all the hidden cruft they generate, but it's simply a bad error handling model. It's very hard to reason what goes on, it creates hidden return paths that are invisible to even the most sophisticated tools (you basically have to run it to know what really happens), and this leads to badly handled error scenarios.
Also, it's often abused for regular control flow, which really muddies the water and very successfully turns even the simplest algorithms into an unreadable mess.
Ideas worth sharing.
ОтветитьBlobify is cool, unfortunately I won't be able to use it, as my code base is a fork of ScummVM, and uses ScummVM's file reading functions.
ОтветитьUsing the word "annotations" with the python construct example is really misleading. In pythons annotations are a well defined part of the language. Nice talk thou :)
ОтветитьThis approach seems very similar to using boost::spirit::x3 for parsing binary data. It also has a simila declarative syntax like the python examples and comes with binary parsers already included. Great talk though.
ОтветитьI've been working on embedded software with C++ for two years and this library is something VERY useful and I'd certainly benefit from it. Unfortunately, our systems don't have enough resources to support exceptions :(.
Ответить