Re: Fwd: Draft Proposed Standard SES (Secure EcmaScript)

David Nicol <[email protected]> Fri, 18 Mar 2016 20:34:39 -0500
Newsgroups gmane.comp.capabilities.general
Message-ID <CAFwScO-s7jDF3YFvY7EogoOZ1TYUs3mBNXy0LFLbbrsH77Gpdg@mail.gmail.com>
--===============3959115536979366117==
Content-Type: multipart/alternative; boundary=001a11c28252fd117f052e5cdd44

--001a11c28252fd117f052e5cdd44
Content-Type: text/plain; charset=UTF-8

I hope the following makes sense, it is imprecise




I have a question. Does SES entirely do away with the "scope chain" and all
passing by shared visibility, trading that for explicit object members, or
are lexical scopes still available?

If lexical scopes are still available, can the global symbols, that
represent immutables, get assigned new representations? That is, can core
features get turned off after we're done using them, like

      function = function(x){ throw }; // we have all the functions we
need, further attempts to compile more will fail.

Can the immutables be lexically hidden? By allowing hiding, you might be
able to avoid having to construct a new eval function with each realm
unless you really need one. That is,
leave "eval" out of the core language, and put in its place
evalFactory(topRealm), with


    var eval = evalFactory(immutableGlobal);
    // or even better
    eval = function(dummySrc) { throw } // not sure how to spell this

as an available compatability shim

so eval, when needed, could get clobbered with whatever realm you want the
evalling to happen in, instead of requiring all realms, even realms that
aren't planning on evalling anything, to have one.



> It is now ready for comments at https://github.com/FUDCo/ses-realm
>




-- 
A circular pizza with radius Z and thickness A has a volume of PI (Z*Z) A

--001a11c28252fd117f052e5cdd44
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I hope the following makes sense, it is imprecise</di=
v><div><br></div><div><br></div><div><br></div><br><div>I have a question. =
Does SES entirely do away with the &quot;scope chain&quot; and all passing =
by shared visibility, trading that for explicit object members, or are lexi=
cal scopes still available?</div><div><br></div><div>If lexical scopes are =
still available, can the global symbols, that represent immutables, get ass=
igned new representations? That is, can core features get turned off after =
we&#39;re done using them, like</div><div><br></div><div>=C2=A0 =C2=A0 =C2=
=A0 function =3D function(x){ throw }; // we have all the functions we need=
, further attempts to compile more will fail.</div><div class=3D"gmail_extr=
a"><div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">Can the =
immutables be lexically hidden? By allowing hiding, you might be able to av=
oid having to construct a new eval function with each realm unless you real=
ly need one. That is,</div><div class=3D"gmail_quote">leave &quot;eval&quot=
; out of the core language, and put in its place evalFactory(topRealm), wit=
h</div><div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote"><br>=
</div><div class=3D"gmail_quote">=C2=A0 =C2=A0 var eval =3D evalFactory(imm=
utableGlobal);</div><div class=3D"gmail_quote">=C2=A0 =C2=A0 // or even bet=
ter</div><div class=3D"gmail_quote">=C2=A0 =C2=A0 eval =3D function(dummySr=
c) { throw } // not sure how to spell this</div><div class=3D"gmail_quote">=
<br></div><div class=3D"gmail_quote">as an available compatability shim</di=
v><div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">so eval, =
when needed, could get clobbered with whatever realm you want the evalling =
to happen in, instead of requiring all realms, even realms that aren&#39;t =
planning on evalling anything, to have one.</div><div class=3D"gmail_quote"=
><br></div><div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote">=
<div dir=3D"ltr"><div><br></div><div>It is now ready for comments at=C2=A0<=
a href=3D"https://github.com/FUDCo/ses-realm" target=3D"_blank">https://git=
hub.com/FUDCo/ses-realm</a></div></div></div></div></blockquote><div><br></=
div><div><br></div><div>=C2=A0</div></div><div><br></div>-- <br><div class=
=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><span style=3D"=
color:rgb(51,51,51);font-family:Georgia,Times,&#39;Times New Roman&#39;,ser=
if;font-size:15px;line-height:21px">A circular pizza with radius Z and thic=
kness A has a volume of PI (Z*Z) A</span><br></div></div></div></div>
</div></div>

--001a11c28252fd117f052e5cdd44--

--===============3959115536979366117==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
cap-talk mailing list
[email protected]
http://www.eros-os.org/mailman/listinfo/cap-talk

--===============3959115536979366117==--