[DGD] Fatal error when no user object returned

bart at wotf.org bart at wotf.org
Thu Jun 7 16:59:33 CEST 2018


On Thu, 7 Jun 2018 16:05:40 +1000, Tony Demetriou wrote
> Ideally an API would never crash.

It doesn't actually crash here either.

> 
> If you violate the expected input, it should give an appropriate 
> error message.

Which is exactly what it does.

The contention here is over this error being fatal, as in, DGD terminates.

As others argued, the call to fatal is a decision, its not ending up there by
accident, and hence calling it a 'crash' is actually not correct.

One can argue about it being proper for this to be a fatal error, I've argued
earlier I think it is and why I think it is appropriate, but that is obviously
a matter of opinion

However, comparing the low level interface provided by for example DGD or any
similar VM to the API provided by say the JRE, or klib or any such object
library is really not correct, they operate at different levels, and serve
different purposes. Integrating both layers somewhat is obviously possible,
look at current fluffos and its ilk for an example of that, but it comes at a
price both with regards to complexity of the driver/vm and flexibility for the
lpc code it can run.

Bart.
--
https://www.bartsplace.net/
https://wotf.org/
https://www.flickr.com/photos/mrobjective/




More information about the DGD mailing list