Re: [Caja] Functional auditor for Cajita

David-Sarah Hopwood <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
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

_______________________________________________
e-lang mailing list
[email protected]
http://www.eros-os.org/mailman/listinfo/e-lang
signature.asc (application/pgp-signature, 292 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAkseAUQACgkQWUc8YzyzqAcCtAD/TvAkFh/+EBY5xCE2BBcR3NA6
u+F6ar+AsUBEXyPpq80BAIClKf85fdxd8UGi+lPPxtCAxs/y0AzjxJrItAtFgcoq
=TXD8
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.