[e-lang] POLA and deserialization

Tony Finch dot at dotat.at
Mon Aug 6 18:39:28 EDT 2007


I've been thinking about distributed message passing (in general - not
specific to E) and how to safely serialize and deserialize messages. In
particular, I would like to be able to pass objects by copying when that
makes more sense than passing by remote reference. This is obviously safe
for "plain old data" types, but more complex types require a constructor
call. However POLA dictates that you must not be able to make me invoke an
arbitrary constructor just by sending me a message - it could do anything.

I suppose one answer is to make the sender explicitly clone the object. To
do so it must have a reference to the remote constructor, according to
strict capability rules. However you get better encapsulation if objects
are able to determine for themselves whether to pass by reference or by
clone - or they might want to migrate leaving behind a proxy, etc.

Does E have an answer to this problem?

Tony.
-- 
f.a.n.finch  <dot at dotat.at>  http://dotat.at/
IRISH SEA: SOUTHERLY, BACKING NORTHEASTERLY FOR A TIME, 3 OR 4. SLIGHT OR
MODERATE. SHOWERS. MODERATE OR GOOD, OCCASIONALLY POOR.


More information about the e-lang mailing list