January 19 meeting notes

John J Barton johnjbarton at johnjbarton.com
Thu Jan 19 21:03:12 PST 2012


2012/1/19 Kevin Reid <kpreid at switchb.org>

> On Jan 19, 2012, at 19:40, Waldemar Horwat wrote:
>
> > Waldemar:  What about read-eval-print loops?
> > MarkM:  Each eval inserts one more nested scope.
>

This is not what users of REPL want or expect.


> > Waldemar:  What if someone does this:
> > > let x = 3;
> > > function foo() {return x;}
> > > let x = 7;
> > This would leave foo returning 3.
> > MarkM:  That's the proper behavior.  Anything else has problems.
>

Developers expect these lines to be part of a program they happened to type
in, in the same scope.


> > Waldemar:  [incredulous]
> > Allen:  We shouldn't spec read-eval-print loops.
>

The scope issues above are complicated by the need to augment the scope
with REPL-specific values, aids to using the environment interactively. The
simple way to implement REPL is eval, the simple augmentation is
"with(REPL-stuff){ ...}"

So we have a feature highly prized by JS developers based on two languages
features unloved on es-discuss: maybe Allen is on to something ;-).


jjb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120119/fba3f1c0/attachment-0001.html>


More information about the es-discuss mailing list