That's where we differ. I agree that pointer/address is a useful
concept in Von Neumann processors, but I consider it a low level
device. And neither Von Neumann considered that stored program
machine the ultimate hardware architecture. Too bad he died before he
could finish his Von Neumann "mark 2" machine...
I don't see them as "low level" I see them as "abstract". It
just so happens that fortunately they are both a convenient
bare metal device and a simple and elegant mental device as
an abstraction of sequences. Dismissing them as "low level"
is as distracting as dismissing a cons cell as "low level".
Note one possible miscommunication we are having is that when
you here "pointer" you may be fixated on the C++ built-in raw
pointer solely whereas I'm also thinking of abstract pointers
including both built-in pointers and other implementations of
those properties such as STL iterators.
Doubly-linked lists pose no implementation problem in Lisp. They're
implement as as serious a ADT as you want them to be. The point is
rather that they're not often useful. But when they're needed,
there's no more difficulty to implement then in lisp than in C or C++.
Of course. And Stepanov knows that intimately. Hence his very
next sentence. So your response is indicating that you might have
entirely missed his point and also did not read his other posts.
(Actually, thanks to the garbage collector, it's a lot more easier to
implement circular data structures such as doubly-linked lists in lisp
than in C or C++).
The issue is not implementing them. It is how convenient are they
to use once implemented. Keep in the mind the *forrest* of generic
programming that Stepanov is trying to point out and don't get
distracted by the *trees* of sequences (containers) he brings up
for examples. (In case you didn't notice there was a proverbial
"don't miss the forrest for the trees" point above
We can implement iterators in lisp or scheme more easily than in C++,
thanks to closures. Closures are a high level construct that allows
to implement in an abstract way a lot of concepts for which you would
use low level constructs such as pointers or iterators in C++.
Perhaps that's the reason why a C++ programmer such as Alexander
Stepanov cannot see them in lisp, he's looking too low.
It seems to me you did not bother to read the rest of the Stepanov
posts in that thread as I suggested? If you had you would have known
that 1) he is definitely not a "C++ programmer" 2) he wrote years
worth
of advanced Lisp code trying to implement his ideas 3) he gave his all
to Lisp in its earliest days and since 4) the iterator concepts he is
trying to implement are, contrary to your claim, not easily done in
Lisp nor any other language he tried (he found something like the C
memory model was essential) 5) he did and does consult with world
experts in other languages to try and implement his ideas.
You are intelligent enough to comprehend and think deeply about the
points he makes if you only open your mind (and heart it seems) long
enough to absorb what he is trying to say. If you are still open to
learning things I think you will find it enjoyable. And the rest of
us might benefit from you having something more intelligent to say
on the topic than (paraphrasing) "Stepanov sucks Lisp can do it
easier than C++" and "closures can do anything" and "Stepanov is
just a blind old C++ programmer".
From your recent posts in c.l.c++ I don't know if your mind can
overcome your emotional bias like I truly hope it can. Here are a
couple of posts you should start with. The second has code you can
analyze and improve on:
http://groups.google.com/group/comp.lang.functional/msg/d7394ad977b3a396
http://groups.google.com/group/comp.lang.functional/msg/b02f11bb1e3485d6
But before you bother you have to at least open your mind to even
the *possibility* that beloved Lisp cannot achieve what he is trying
to achieve. Can you emotionally and intellectually do that as any
good scientist must?
KHD