Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!hao!boulder!sunybcs!rutgers!ucla-cs!zen!ucbvax!DECWRL.DEC.COM!joel From: joel@DECWRL.DEC.COM Newsgroups: comp.lang.modula2 Subject: Re: Number of elements in a set Message-ID: <8709142056.AA10394@vulcan.dec.com> Date: Mon, 14-Sep-87 17:56:57 EDT Article-I.D.: vulcan.8709142056.AA10394 Posted: Mon Sep 14 17:56:57 1987 Date-Received: Wed, 16-Sep-87 00:44:23 EDT References: <8709140824.AA21380@cayuga.cs.rochester.edu> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 25 Pascal's set constructors are untyped, and there are cases where context iss insufficient to determine at compile time the boundaries of a set. Most implementations thus implement sets of some small, fixed, size (like 16, 32, 128, or 256 elements). The UCSD implementations go to some pains to allow dynamically sized sets up to 4096 elements (8-bit microcomputers can deal with 256 16-bit words without too much grief). Modula-2's set constructors are typed, and therefore the size of the set is always known at compile time. Many implementations nonetheless implement sets as the word size of the machine, because then it's easy to generate single machine instructions. It is not hard to implement sets of effectively unbounded size; further, it is usually more efficient, and certainly more readable and useful to have large sets than to simulate this with the corresponding user code. One can only hope that the eventual ISO standard will say something useful about sets, like you can have at least as many elements as, say, MAXINT. But people who haven't implemented such tend to vote against inclusion of such language, so don't count on it. - Joel McCormack {ihnp4 decvax ucbvax allegra}!decwrl!joel joel@decwrl.dec.com