[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jan 7 15:48:50 1993 
Subject:lvars and standards (was: Re: List and Vector Syntax) 
From:Ian Rogers 
Volume-ID:930107.02 

axs@cs.bham.ac.uk (Aaron Sloman) writes:
> Of course all the proposed changes will prove so painful to the
> existing Pop-11 users that many of them will want to go on using the
> old version (just as many refuse to switch to using lexical
> variables: they like the non-lexical defaults: witness the new
> book by Chris Thorton and Ben du Boulay "Artificial Intelligence
> Through Search" which uses Pop-11 and Prolog throughout, and so
> far I've not found a single "lvars" in it!).

I have met noone who can provide a rational argument for dynamic
locals over lexical locals! The current "vars" mechanism is a
syntactic sugar for creating top-level identifiers and localising
them to a procedure. I saw this device used to my horror when I was
tidying a core flavours library (it's fixed now :).

I'm glad that AITS does not contain any lvars statements as that
would make Pop11 seem bulky and unwieldy. It is possible to
construct examples, that use the default declarations, that do not
require the benefits of lvars and avoid the hinderances of vars.

lvars as default is a Good Thing, the One True Way, there Can Be No
Argument!!!!! :-) There are many examples and arguments that show
this. I shan't attempt to repeat them all here but here's one goody:

    vars i = 'got it wrong buster';

    define make_pdr(i);
        procedure;
            i =>
        endprocedure
    enddefine;

    vars pd = make_pdr(3);
    pd();
    ** got it wrong buster

Huh ??!?!?!?!!?!?

    define do_it_right(i);
        lvars i;
        procedure;
            i =>
        endprocedure
    enddefine;

    vars yup = do_it_right(10);
    yup();
    ** 10

-dlocal-ising a permanent identifier is a special programming
technique, and should be exposed by a deliberate "dlocal" whenever
it occurs.

Aaron often talks about beginners, my hunch is that they won't
notice the difference between default "vars" and "lvars" locals
(and don't initially understand either).

> So the "pop" community will inevitably be further fragmented once an
> implementation of Pepper becomes available.

Probable, if we miss the chance to create a standard Pop11.

> A new "standard" won't have the same effect as with C, where
> everyone (or almost everyone) agreed to a new version because people
> trying to produce portable software in C were already suffering from
> the incompatibilities between differen versions produced by
> different vendors. There's no such pressure for a new standard for
> Pop.
>
> Perhaps pressure will be created by producing an implementation
> of Pepper that runs on very popular machines where Poplog Pop-11 is
> not available, i.e. PCs running MSDOS and Macs !!!!

There will be no MSDOS or Mac version of Pop11 without an
identifiable, sufficient subset of Pop11 commands and syntax. This
is why Pepper and GLOW have occurred!

If we allow market forces to reign then in 10 years time (if we're
lucky) the standard Pop11 will be a mixture of the de-facto
standards of Pepper and GLOW. Pop11 will disappear.

A standard Pop11 will provide an impetus for a portable Pop11. By
following Steve's lead we have the chance to strongly influence the
standard.

Ian.