Well, well...

Sean Kelly sean at f4.ca
Thu Aug 2 22:45:35 PDT 2007


BCS wrote:
> Reply to Sean,
> 
>> It shouldn't halt, but a sub-process handling some portion of the
>> web-page loading might.  Say you launch a process to grab the HTML and
>> it in turn launches additional processes to get the images, etc, which
>> need to be displayed.  Any one of these processes may encounter an
>> error and abort, but the browser would continue to run and the rest of
>> the page would still load.
> 
> in short, a process is small enought that all errors are fatal (to it)
> 
> ?

Yup.  And it may be that Erlang does actually allow recovery from errors 
(I only know what I've read so far, and that's relatively little), but I 
think I'd probably only use this for failing more gracefully.

>>  The key, I think, is considering processes
>> in Erlang to be a bit like classes or modules in D.
> 
> or stack frames?

Yeah I suppose.  Though I was going more for processes as lightweight 
services.  Similar things are done in languages like Java and C++ now 
(RMI, etc), but the services there tend to be heavy-weight.  In Erlang 
it seems common to even perform recursion and such via process spawning.


Sean



More information about the Digitalmars-d mailing list