[MOAB-dev] Discussion on return type of MOAB routines
Tim Tautges (ANL)
tautges at mcs.anl.gov
Wed Jan 22 13:26:57 CST 2014
On 01/22/2014 01:21 PM, Jed Brown wrote:
> "Tim Tautges (ANL)" <tautges at mcs.anl.gov> writes:
>> This depends on how often it happens. In all cases, IMO, a success condition should result in nothing more than a
>> POD-sized object (and I should add, no virtual table).
>
> vtables are just pointers like any other in terms of performance.
>
Sure but we still don't want that extra expense.
>> If it's a non-success condition that is "expected" (normal condition
>> that's handled by the calling code), IMO this shouldn't print anything
>> by default. If it's a non-success that's also unexpected, printing is
>> fine (including stack trace).
>
> I don't believe in expected failures. I find keeping expected and error
> conditions in-band leads to confusing control flow, but YMMV.
>
It's entirely dependent on the application, same API call, same return, different handling, and in some cases the
application is a tool inside the library.
- tim
--
================================================================
"You will keep in perfect peace him whose mind is
steadfast, because he trusts in you." Isaiah 26:3
Tim Tautges Argonne National Laboratory
(tautges at mcs.anl.gov) (telecommuting from UW-Madison)
phone (gvoice): (608) 354-1459 1500 Engineering Dr.
fax: (608) 263-4499 Madison, WI 53706
More information about the moab-dev
mailing list