[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: API conflicts



> Bradd W. Szonye wrote:
>> This may well be a major issue with the exceptions approach,
>> especially given the tendency to put collection code in inner loops.
>> I have a similar concern regarding the use of coroutines to implement
>> cursors and multi-collection enumerations. They use continuation
>> objects to manage control just as exception-handling code does.

scgmille@xxxxxxxxxxxxxxxxxx wrote:
> Actually theres a third argument, too.  Is it really an error, or a
> branch?  I would argue is the latter.  Its not so much that the
> absence thunk is there 'in case something goes wrong'.  Its more like
> those operators are acting as conditionals, returning one value when
> the collection can provide it, and evaluating the thunk if it cannot.
> This is the semantic argument.

That's why it "raises an exception" rather than "signals an error."
While it isn't necessarily an error, it is an exceptional condition,
because the procedure can't supply the requested data.
-- 
Bradd W. Szonye
http://www.szonye.com/bradd