Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!ittvax!sii!wje From: wje@sii.UUCP (Bill Ezell) Newsgroups: net.lang Subject: Re: loop indexing Message-ID: <387@sii.UUCP> Date: Tue, 17-Jan-84 10:51:58 EST Article-I.D.: sii.387 Posted: Tue Jan 17 10:51:58 1984 Date-Received: Wed, 18-Jan-84 06:57:09 EST Lines: 31 b Avl (an applications implementation language for Unix) provides a generator facility: foreach(a,b) { .. } which means 'for each a in b'. Since the basic datatype is a tree of trees, foreach is very useful. Because the compiler optimizes references to 'a' to be pointers into 'b', execution is much faster than explicit iteration. I have found this to be very natural way to deal with sets of data; it is surprisingly rare to actually need to know the order in which things are manipulated. Note that Avl has no explicit pointers; the compiler hides the fact that 'a' is a pointer. This allows the efficiency gained by pointer manipulation without the complexity (and confusion) commonly associated with explicit pointer datatypes. 'a' is treated specially only within the scope of the foreach. -Bill Ezell Software Innovations, Inc. (decvax!sii!wje) (ittvax!sii!wje) PS: Incidentially, Avl isn't a 'toy' language; it is currently being used by OEM's for real applications programming.