[Python-Dev] Re: Capabilities
Tue, 18 Mar 2003 11:55:05 -0500
(I, Zooko, wrote the lines prepended with "> > ".)
Aahz <email@example.com> wrote:
> > No -- capabilities (as envisioned for Python) are references. Whether
> > a reference to an object, to a bound method, or to a function doesn't
> > matter.
> > Note that it isn't that capabilities are "like" references, it is
> > that capabilities *are* references. Every reference is a capability.
> > Every capability is a reference.
> <blink> Are you saying that an int is a capability?
Do you mean: references are really just memory addresses? Python has pointer-
safety so Python code cannot access a Python object without a reference to it,
even if it knows that object's memory address. This is the first requirement
listed in this message: .
Or do you mean: I could have a reference to some fundamental computational
concept like an int -- would that reference be a capability?
I would say yes, all references, even to some basic programming language
constructs like None or True, are capabilities. Things like None, True,
integers, etc., need to be available to all code (just so that we don't have to
pass the same bundle of dozens of standard references to every object we
create). Fortunately they can also be made safe so that it is okay for
untrusted code to access them. Unfortunately the current implementations of
things like None are not safe .
This is part of the third requirement listed in .
^-- under re-construction: some new stuff, some broken links