[e-lang] Joe-E ByteArray stream interface and character encoding/decoding
Jon Leonard
jleonard at oasis.slimy.com
Thu Oct 18 15:12:08 EDT 2007
On Thu, Oct 18, 2007 at 11:39:21AM -0700, David Wagner wrote:
> Jon Leonard writes:
> >I don't see a lot of point in trying to get rid of IO-related
> >nondeterminism (since it seems intrinsic: When will the user act?), but
> >I may be misunderstanding taming.
>
> The goal is to make sure that nondeterminism is not ambiently
> available, i.e., you should only be able to get access to nondeterminism
> if you are given some kind of capability. IO is also not ambiently
> available; you have to be given a capability before you can do IO.
>
> The goal above helps demonstrate that some code is deterministic.
> For instance, if the only object references in scope are Powerless,
> then we can conclude that the code does not have access to anything
> that would provide nondeterminism and hence the code is deterministic.
> That seems potentially useful.
>
> The code that Tyler posted makes access to an InputStreamReader
> ambiently available, hence we need to be careful to ensure that it
> does not provide access to nondeterminism.
Ah, I see what I missed. InputStreamReader is abstracting away the
(sometimes irrelevant) detail of where the stream comes from. It could
be an IO stream, or some process-internal source.
That detail is relevant to a capability analysis, though, and the
specification unfortunately didn't limit the nondeterminism to only
the IO case. That makes it pretty hard to tame, unfortunately.
I'd assumed that it was just talking about IO streams, which are, as you
say, available only with a suitable capability.
Jon Leonard
More information about the e-lang
mailing list