[DGD] Fatal error when no user object returned

Dread Quixadhal quixadhal at gmail.com
Thu Jun 7 17:11:54 CEST 2018


I think the main grumbling point here is that the idea of the driver terminating if the connection object isn’t valid (either didn’t compile, or didn’t have the right calling interface), made perfect sense back when DGD was used as a game driver where everyone just connected to it to play.  Not much of a game if nobody can connect, right?

However, now that it allows multiple ports, some or all of which can be used for non-essential services, it’s not as convenient or logical to have the whole thing shut down because one service can’t operate.

The analogy would be an old school monolithic OS kernel, where everything is compiled in, and an error in the network driver or video driver would crash the entire system… or a modular kernel where the same error would cause that module to die and be relaunched.

Of course, as long as we’re talking about DGD and not Hydra, the source *IS* available, and thus one could modify it to have a different behavior.  Who knows, if such changes were clean and didn’t impact performance, they might even be accepted as a compile-time option someday, in the mainline driver.  Only Dworkin knows for sure. 😊

Sent from Mail for Windows 10

From: bart at wotf.org
Sent: Thursday, June 7, 2018 7:53
To: All about DGD and Hydra
Subject: Re: [DGD] Fatal error when no user object returned

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/

____________________________________________
https://mail.dworkin.nl/mailman/listinfo/dgd




More information about the DGD mailing list