Path: utzoo!attcan!uunet!mcvax!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.lang.misc Subject: Re: What makes a language "easy" to program in? Message-ID: <364@piring.cwi.nl> Date: 10 Jun 88 09:23:56 GMT References: <350@piring.cwi.nl> <711@cunixc.columbia.edu> <3799@pasteur.Berkeley.Edu> <712@cunixc.columbia.edu> <3880@pasteur.Berkeley.Edu> Reply-To: guido@cwi.nl (Guido van Rossum) Distribution: comp Organization: The Royal Society for Prevention of Cruelty to Amoebae Lines: 18 In article <3880@pasteur.Berkeley.Edu> faustus@ic.Berkeley.EDU (Wayne A. Christopher) writes: >The way you would add such data types to a language is to build them out >of the primitives available, which are pointers (in the case of C), or >arrays (in the case of APL). Actually adding them as primitives would >be a very bad idea -- you could never add enough to make everybody happy. Not true. ABC, a language I have helped implement, has no pointers but provides very general associative arrays (you can use *any type* as the key type for an array, and of course arrays are types) and sorted multisets ("lists"). These two primitive data types make up for many uses of pointers. True, for things like graphs you have to implement them using arrays, but now you can choose meaningful values as the indices instead of assigning numbers 1, 2, 3, ...; e.g., in a directed graph, you can use the label of the destination node to represent an edge. -- Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam guido@piring.cwi.nl or mcvax!piring!guido or guido%piring.cwi.nl@uunet.uu.net