[prev in list] [next in list] [prev in thread] [next in thread] 

List:       e-lang
Subject:    [e-lang] Controversial (or false) statement --- Erlang is almost,
From:       Matej Kosik <kosik () fiit ! stuba ! sk>
Date:       2008-02-10 23:13:51
Message-ID: 47AF852F.6050900 () fiit ! stuba ! sk
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Here

	http://wiki.erights.org/wiki/Object-capability_languages

is stated

	"Erlang is almost, but not quite an object-capability language."

I would like to ask if you are sure about that.



I do not see Erlang as `almost object-capability language'.

Important things that is happening in Erlang are procedure calls. Some with, and some without side
effects. Procedures are designated by

	ModuleName:FunctionName

pair where both, the module name and function name are atoms. Atoms are not capabilities.

Other things that we might be tempted to regard as weak capabilities such as PIDs can be constructed
and effectively guessed:

	list_to_pid("<0.37.0>")

converts string "<0.37.0>" to PID. So, if anything else, the standard library of this language
provides lot of dangerous procedures.

Additionally, the PID is an improper kind of capability because you need it if you want to talk to a
given process, but as soon as you have it you have also the authority to kill a given process (by
calling

	erlang:exit(Pid, Reason)

procedure.

Existing code can load new code version from disk and thus change anything. Existing code can
generate and compile new code and redefine behavior of any existing part of the system.

These are just few things I recall but there are certainly many other problems. I am might be wrong
but then I do not have correct understaning of these matters.

What I would see reasonable to create a category:
- - non object-capability languages
and add Erlang there. It might be interesting if knowledgeable people also analyised and point out
problems with other languages. I would be interested if
- - Ada, which was mentioned on cap-talk some time ago, is object-capability language and if not how
much work had to be done to tame it (in months)
- - C#, Sing used in Singularity could be regarded as object-capability languages or if they could be
tamed.

What do you think?
- --
Matej Kosik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHr4UvL+CaXfJI/hgRAiN1AJ9Q1wHfTrqZgUR7j5heEAj6j/HD6QCfXypT
Pw4Tt7R5Bkd3IWT1Nhueewk=
=OBrY
-----END PGP SIGNATURE-----
_______________________________________________
e-lang mailing list
e-lang@mail.eros-os.org
http://www.eros-os.org/mailman/listinfo/e-lang
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic