List of Phobos functions that allocate memory?
Dicebot
public at dicebot.lv
Fri Feb 7 02:59:03 PST 2014
On Friday, 7 February 2014 at 01:31:17 UTC, Ola Fosheim Grøstad
wrote:
> On Friday, 7 February 2014 at 01:23:44 UTC, Walter Bright wrote:
>> Right. If you're:
>>
>> 1. using throws as control flow logic
> [...]
>> you're doing it wrong.
>
> I disagree.
>
> REST based web services tend to use throws all the time. It is
> a an effective and clean way to break all transactions that are
> in progress throughout the call chain when you cannot carry
> through a request, or if the request returns nothing.
And it is horrible. Exceptions were never designed for this. Try
benchmarking trivial vibe.d REST service looking up an entry in
an array and throwing 404 upon failure. Difference in performanc
between "all requests are 200" and "all requests are 404" will be
of order of magnitude.
More information about the Digitalmars-d
mailing list