guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making guardians a module?


From: Michael Livshin
Subject: Re: Making guardians a module?
Date: 06 Dec 2000 19:15:16 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (20 Minutes to Nikko)

Dirk Herrmann <address@hidden> writes:

> This property of guardians makes it difficult to use them in modular
> code, since whether or not an object is protected by a guardian
> should be an implementation detail, and other code should not depend
> on that fact.

clearly, the "what is multiply guarded is multiply returned" property
of guardians is kind of unintuitive.

the problem is that breaking this property leads to worse semantic
problems, like order dependencies.

I'm not sure what to suggest here, in general.  I think that if you
write a module that uses guardians, then you should document what
objects are guarded and how many times, so that client code that also
uses guardians won't lead to nasty surprises.

but!: client code that doesn't use guardians won't suffer.

so I would suggest _not_ treating guardian protection as
implementation detail -- it should be a part of the documented
interface.  with the nice property that only guardian-using code cares
about it, and most client code really shouln't be.

-- 
What is this talk of 'release'? Klingons do not make software
'releases.' Our software 'escapes' leaving a bloody trail of designers
and Quality Assurance people in its wake.
                                        -- Klingon Programmer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]