[Python-Dev] Re: Capabilities
Zooko
zooko@zooko.com
Tue, 18 Mar 2003 11:55:05 -0500
(I, Zooko, wrote the lines prepended with "> > ".)
Aahz <aahz@pythoncraft.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: [1].
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 [2].
This is part of the third requirement listed in [1].
Regards,
Zooko
http://zooko.com/
^-- under re-construction: some new stuff, some broken links
[1] http://mail.python.org/pipermail/python-dev/2003-March/033891.html
[2] http://mail.python.org/pipermail/python-dev/2003-March/033945.html