Could Emacs be rewritten in Python?

Alexander Schmolck a.schmolck at gmx.net
Mon Apr 14 17:09:17 CEST 2003


Michael Hudson <mwh at python.net> writes:

> Alexander Schmolck <a.schmolck at gmx.net> writes:
> 
> > Michael Hudson <mwh at python.net> writes:
> > 
> > > Paul Foley <see at below.invalid> writes:
> > > 
> > > > [It should do that for lexical variables, too...conflating binding and
> > > > assignment the way Python does is a major design error, but it's too
> > > > late to fix it now]
> > > 
> > > I'm unconvinced about the "major"... but anyway: how would *you* do
> > > it?  It seems unfeasible syntactically, for starters.
> > 
> > ... what's wrong with e.g:
> > 
> > def bar():
> >    # declares locals, similar to ``global``
> >    var a,b,c = 3
> >    x = 3 # error
> >    a = 4 # OK
> > 
> > or 
> > 
> > 
> > def bar():
> >    let x=3, y=4:
> >      print x, y # OK
> >    x, y # ERROR
> > 
> > ?
> 
> Requiring declarations of all variables would be a HUGE change to
> Python, IMHO.

Sure and I'm in no way arguing for such a change (and neither Paul Foley who,
unlike me, considers implicit declaration a major flaw). I just don't
understand why it would "unfeasible syntactically" -- *syntactically* it seems
quite unproblematic to me.

'as




More information about the Python-list mailing list