In an earlier post I wrote:
> > It is necessary to add the rider that in Pop11, input locals need to be
> > declared owning to a syntax design fault.
To this comment Ian remarks:
> That's a little too harsh. No variables *need* to be declared[1] in
> Pop11, you just get the lowest possible form of identifier imagined
> ;)
Well I can't help but take Ian's bait. Now, are these two functions the
same or different?
define add( e, l ); lvars e, l;
if member( e, l ) then l else e :: l endif
enddefine;
;;; For the non-Pop readers, this is an explicit version of what you
;;; get when defaults are left out. It is slightly simplified w.r.t.
;;; active variable declarations, of course.
vars elem, lis;
define add( elem, lis );
dlocal elem, lis;
if member( elem, lis ) then lis else elem :: lis endif
enddefine;
If they are different, which one did you intend to write (and it clearly
matters)? So, if you got the answers right, I think it is fair to say that
in today's Pop11 you *need* to declare input locals. And I hate it. For
goodness sake, even Lisp gets this correct! And they've had lots of practice
at inventing wonky syntax.
> I'm reminded that Pop9x can always do with a helping hand. Steve: is
> the standard yet at a stage where a programming consortium could be
> usefully constructed?
Yes, especially in the sensitive area of new proposals. As Pop9X stands
it is a rubber-stamp of existing Pop11. This is for simplicity rather
than anything else. If we start from a known base then we may cautiously
make progress.
Steve
|