🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #3828

Re: Number of elements in a set

#3828
From: Hal Chambers
Date: Tue, 15 Sep 1987 12:20
32 lines
2167 bytes
In article <8709142056.AA10394@vulcan.dec.com> joel@DECWRL.DEC.COM writes:
>...
>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
>...
>- Joel McCormack {ihnp4 decvax ucbvax allegra}!decwrl!joel
>		 joel@decwrl.dec.com

I was totally shocked to see how Wirth handled BITSET in the MODULA-2
definition.  He makes the effort in the language design to require
system dependent modules to identify themselves by containing imports
from SYSTEM.  Then, instead of BITSET being defined in SYSTEM we find
that it is a STANDARD type and its import is PERVASIVE!!??
Furthermore, a set with unspecified type has type BITSET.

A set is a perfectly abstract concept that has nothing to do with
machine structures.  Yes, it has to be implemented on a machine, but
it you go to the trouble to provide it at all it shouldn't have
artificial restrictions.  Also, if there is going to be a default
set type I think it makes much more sense to make it
	SET OF CHAR;

I am not condemning the language though.  I like MODULA-2 very much.
I even like case dependent identifiers (although, I'm not thrilled
with UPPERCASE KEYWORDS).  I always use the compiler option that
enforces use of the standard language.

Cheers,
Hal Chambers
Technical Details
Message-ID: <813@newton.physics.purdue.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!husc6!rutgers!iuvax!pur-ee!newton.physics.purdue.edu!hal
References: <8709140824.AA21380@cayuga.cs.rochester.edu> <8709142056.AA10394@vulcan.dec.com>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!husc6!rutgers!iuvax!pur-ee!newton.physics.purdue.edu!hal
From: hal@newton.physics.purdue.edu (Hal Chambers)
Newsgroups: comp.lang.modula2
Subject: Re: Number of elements in a set
Message-ID: <813@newton.physics.purdue.edu>
Date: Tue, 15-Sep-87 08:20:51 EDT
Article-I.D.: newton.813
Posted: Tue Sep 15 08:20:51 1987
Date-Received: Fri, 18-Sep-87 02:10:34 EDT
References: <8709140824.AA21380@cayuga.cs.rochester.edu> <8709142056.AA10394@vulcan.dec.com>
Reply-To: hal@newton.physics.purdue.edu.UUCP (Hal Chambers)
Organization: Purdue Univ. Physics Dept., W. Lafayette, IN
Lines: 32
Summary: SET is an abstraction