Re: [crit] Fallen

On 27 May 2009 23:58:48 GMT, "John F. Eldredge" <john@xxxxxxxxxxxxxx>

On Wed, 27 May 2009 15:31:34 +0000, Jonathan L Cunningham wrote:

On Wed, 27 May 2009 16:01:33 +0300, Antti-Juhani Kaijanaho
<antti-juhani@xxxxxxxxxxxx> wrote:

John F. Eldredge kirjoitti:
On Wed, 27 May 2009 13:47:00 +0300, Antti-Juhani Kaijanaho wrote:
In these languages, persistent data structures (like various search
trees) are preferred over array-based techniques.

I personally would class an array as a persistent data structure,
assuming that it doesn't have local scope. Admittedly, it isn't a
particularly sophisticated data structure.

A persistent array requires making a copy of the whole array each time
any element is changed. Thus, making an array persistent destroys one
of the main attractions of the data structure, namely in-place updates.

I think that's an implementation detail. In one of my favourite
languages, arrays are just functions[*]. (Modifying the array means that
you are changing the function.)

In that language it is trivial to put a wrapper around any function to
filter the arguments/results.

Of course after assiging to array elements a few hundred times, you'd
end up with a chain of a few hundred wrappers... so you might want to
copy the array every so often. But, as I said, an implementation detail.

(I'm using persistence here in the sense of Driscoll & Sleator & Tarjan
JACM 41 (5).)

I have to guess what you mean by persistence, since I haven't read it.

[*] Not lisp, obviously. It's a language called pop11.

I hadn't encountered that definition of "persistent" before, and I have
worked as a programmer/analyst since 1986. The definition of
"persistent" that I have encountered is "not local", i.e., the data has
module-level or global-level scope, and so doesn't go away when a
particular subroutine or function exits. I have also seen this term used
to mean data that is stored externally to the program, such as on disk,
so that it continues to exist once the program terminates.

In the contexts I'm familiar with, the concept you are describing is
referred to as "dynamic scope", i.e. instead of "X is persistent" I'd
say "X has dynamic scope" (as opposed to lexical scope).

Actually, it's not quite that simple... since dynamic scope is not quite
the same thing as module-level scope etc.

IME, in every field[*] there are "cliques" or "communities" and they all
use slightly different jargon. Sometimes there is a superstar or guru,
and (some of) his terminology becomes accepted as standard, and
sometimes a market leading company, e.g. IBM first, later Microsoft,
impose new terminology by getting the old terminology wrong, misusing it
in other ways, or reinventing wheels and given them new names. No doubt
the marketing department is relevant too. :-)

(My first paid programming work was in 1974 -- and I've seen a *lot* of
terminology come and go, and change meaning.)

[*] We see it here, too, with writing terminology.

"If I let everyone I thought was an idiot die - there
wouldn't be many people left." - Gilgamesh Wulfenbach