[e-lang] Joe-E Taming Policies
Adrian Mettler
amettler at cs.berkeley.edu
Fri Sep 18 00:32:50 EDT 2009
For the most part, the prohibitions you've encountered are a result of
the taming process being incomplete at present -- there are a lot of
would-be-safe classes that we haven't looked at yet. We're hoping to
add more on an on-demand basis, so people can build more stuff with it.
StringBuffer and StringBuilder should both be safe; the only reason
one is currently allowed and not the other is that we have mostly written
single-threaded (or vat-based-concurrency) code, which does not need
StringBuffer's thread-safety.
Hashtable is unsafe to use if you want Joe-E's determinism guarantees to
hold: the iteration order of the hashtable depends on the hash codes
assigned to the objects placed in it; for many classes, the hash code is
nondeterministic as it is the JVM's internal identifier for the object
instance. Hashtable is OK if you do not need the determinism guarantees.
-Adrian
Mohsen Vakilian wrote:
> Hi,
>
> Can anyone explain the rationale behind the following Joe-E error
> messages? I don't see why the following classes should be disabled by
> Joe-E. For instance, does creating a StringBuffer as a local variable of
> a method cause impurity? Why is StringBuilder allowed but not StringBuffer?
>
> Disabled constructor from class ArrayIndexOutOfBoundsException called:
> default deny
> Method from disabled type Hashtable called: no policy specified for this
> class
> Disabled constructor from class StringBuffer called: default deny
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> e-lang mailing list
> e-lang at mail.eros-os.org
> http://www.eros-os.org/mailman/listinfo/e-lang
More information about the e-lang
mailing list