[e-lang] [Caja] Functional auditor for Cajita

David-Sarah Hopwood david-sarah at jacaranda.org
Mon Dec 7 23:33:18 PST 2009


David-Sarah Hopwood wrote:
> [Cross-posted to e-lang from google-caja-discuss. I suggest continuing on
> e-lang, since there's not much that is Caja-specific here.]
[...]
> It's unclear whether we should call a function "purely functional"
> if it is possible for it to be called with impure arguments (or use
> captured values that are impure). If it can, and we require it to
> have no side effects and be deterministic in that case, then almost
> no useful functions are pure.
> 
> To dodge this issue, let's provisionally call a function *instance*
> "copacetic" [*] if:
>  - that instance has only captured copacetic values, and
>  - it has no side effects and is deterministic whenever it is
>    only called with copacetic argument values, and
>  - it uses no side-effecting or nondeterministic primitives.

I should also have specified that
 - primitive immutable values are copacetic,
 - frozen objects that directly refer only to copacetic values
   are copacetic,
 - no values are copacetic unless they can be inferred to be so by
   the rules above.

I think this corresponds to the Functional auditor in E (see
<http://www.erights.org/elang/kernel/auditors/>). Is that correct?

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 292 bytes
Desc: OpenPGP digital signature
Url : http://www.eros-os.org/pipermail/e-lang/attachments/20091208/a8c277b0/attachment.bin 


More information about the e-lang mailing list