Path: utzoo!attcan!uunet!oddjob!uwvax!rutgers!orstcs!mist!budd From: budd@mist.cs.orst.edu (Tim Budd) Newsgroups: comp.lang.misc Subject: Re: What makes a language "easy" to program in? Message-ID: <5061@orstcs.CS.ORST.EDU> Date: 10 Jun 88 15:48:44 GMT References: <350@piring.cwi.nl> <711@cunixc.columbia.edu> <3799@pasteur.Berkeley.Edu> <712@cunixc.columbia.edu> <3880@pasteur.Berkeley.Edu> Sender: netnews@orstcs.CS.ORST.EDU Reply-To: budd@mist.UUCP (Tim Budd) Distribution: comp Organization: Oregon State Universtiy - CS - Corvallis, Oregon Lines: 33 In article <3880@pasteur.Berkeley.Edu> faustus@ic.Berkeley.EDU (Wayne A. Christopher) writes: >In article <350@piring.cwi.nl>, guido@cwi.nl (Guido van Rossum) writes: >> Remember that trees are often used as a way to implement other >> abstractions: associative arrays, sorted sets with easy insert/ >> retrieve/delete operations, etc. It might be more appropriate to >> add such "higher-level" data types to a language than pointers. > >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. > >The sorts of things I use pointers for that I couldn't use arrays for >are parse trees and graphs (both directed and undirected). In this particular case, however, I believe Guido speaks from personal experience. The language project he was formerly associated with, the ABC language, developed by Lambert Meertens at the CWI, is designed for novice users (a replacement for BASIC and the like). It has exactly five data types: numbers, texts (strings), compounds (records without field names), lists (which are sorted), and tables (associative arrays). This seems to be a fairly complete and useful set, particularly for things like graphs and parse trees. (I once wrote the LALR sets-of-states construction algorithm in ABC; it was about two pages of code). I've never been able to figure out why we think in computer science that students should have to build their tools before they use them. Sort of like having to use an anvil and forge to build your hammers and screwdrivers before you can learn carpentry. Now really; wouldn't it make much more sense to give people a few useful tools to start out with, and let them get down to solving their problems that much sooner? --tim budd, oregon state university (budd@cs.orst.edu)