Program logic bugs vs input/environmental errors

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Oct 4 13:10:37 PDT 2014


On 10/4/2014 6:36 AM, Joseph Rushton Wakeling via Digitalmars-d wrote:
> Suppose that I implement, in D, a framework creating Erlang-style processes
> (i.e. properly isolated, lightweight processes within a defined runtime
> environment, with an appropriate error-handling framework that allows those
> processes to be brought down and restarted without bringing down the entire
> application).
>
> Is there any reasonable scope for accessing Phobos directly from programs
> written to operate within that runtime, or is it going to be necessary to wrap
> all of Phobos in order to ensure that it's accessed in a safe way (e.g. to
> ensure that the conditions required of in contracts are enforced before the call
> gets to phobos, etc.)?

A start to this would be to ensure that the erlang-style processes only call 
pure functions. Then I'd add pervasive use of immutable data structures. This 
should help a lot.



More information about the Digitalmars-d mailing list