Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!hplabs!otter.hpl.hp.com!otter!ke From: ke@otter.hpl.hp.com (Kave Eshghi) Newsgroups: comp.lang.prolog Subject: Re: Arrays in Prolog Message-ID: <1600024@otter.hpl.hp.com> Date: 28 Aug 90 12:53:18 GMT References: <90239.175243SCHMIED@DB0TUI11.BITNET> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 17 First of all: it is nonesense to say that one should not use arrays becauses it involves destructive assignment. In fact, the reason one needs to use arrays is precisely that one needs the efficiency of destructive assignment for very large data structures. (Well it is one of the reasons anyway.) I find the dogmatism of the Prolog purists who oppose arrays and then (surreptitiously) condone using asserts and retracts bordering on religious fanaticism. On the practical side, for those who use the Poplog system, there is a very neat solution to this problem. Simply use Pop11 arrays to store your Prolog terms. The interface between Pop11 and Prolog is almost transparent for this type of thing, and you will not have any of the usual headaches related to multiple-language programming. For those who do not use Poplog, well.... Kave Eshghi