[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Apr 2 16:45:06 1993 
Subject:Re: pop9x and orthogonal procedures 
From:Steve Knight 
Volume-ID:930402.02 

In comp.lang.pop, lpb@cs.bham.ac.uk (Luc Beaudoin) writes:
> [...] the problem of the Poplog
> documentation which doesn't clearly specify what kind of arguments 
> [datalist, datalength] can operate on.

I agree with Luc, the documentation is inadequate.  The issue, in my view,
is that there is an underlying hierarchy of classes that is not explicit.
Consequently the documentation (and actual procedures) are inconsistent
and incomplete.

To make things clear, you can explode all records (except lists are special, 
ick!) all vectors, words, and the procedure sub-types -- arrays, properties and 
closures.  Since datalist is defined in terms of explode, this is enough
for datalist.  

Datalength is a distinct primitive, despite the similarity of names, because
it does not respect lists but treats them as either a pair or a nil.  It
isn't clear to me why -datalength- exists -- I believe it should be removed
in favour of -length-.

One of the activities I undertook in Pop9x was to explicitly draw out
the class hierarchy of Pop-11.  [This work was the main stimulus for the
development of ObjectClass, incidentally.]  With a sensible class 
hierarchy in place, a lot of the confusions become plain.  For example,
why does -substring- exist for strings but not for vectors or lists?  After
all, substring has got nothing much to do with characters.  Why does 
-rev- only work on lists?  

When we look at the Common Lisp world, we find a better and more explicit
class system for the built-in types.  When we look at Dylan, I believe we
find the best of Common Lisp types and Pop-11's generic functions but done
better than both.  This is one of the strong pressures behind the introduction
of ObjectClass (or similar) into the Poplog system.

Steve