[plt-scheme] Re: plt-scheme type of language

From: Carl Eastlund (carl.eastlund at gmail.com)
Date: Fri Dec 11 17:45:07 EST 2009

On Fri, Dec 11, 2009 at 5:30 PM, Raoul Duke <raould at gmail.com> wrote:
>> Trying to throw
>> lexical and dynamic binding in at the same time, and make a meaningful
>> comparison, and evaluate it in the context of both implementation and
>> pragmatic programming, is overload.
>
> that makes sense to me.
>
> i think this, as with all teaching, is heavily context-sensitive. i
> can imagine approaches to teaching beginner programmers that would in
> fact allow for and benefit from talking about both dynamic and static
> scope. but if the context is not one that allows for that, then it
> might be right not to, granted.
>
> on the other hand, it might be a sign that the context needs to be
> changed first.

At the beginner level (which I take to mean a first-year college
course), I would say unequivocally that only one notion of scope
should be introduced, and that notion should be lexical scope.
Programming (and scope) is difficult enough, without adding the
inconsistencies of dynamic scope or the complexity of two kinds of
scope.  As you say, the issue is one of context, and beginners do not
have any.

In a later course -- for instance, a sophomore or junior programming
languages course, which I assumed as context in my prior message -- I
think there is more room for debate on whether to cover dynamic scope.
 Personally, I would not cover it the first time I introduced scope
formally, but in the course of a semester I could see it fitting in.

--Carl


Posted on the users mailing list.