Aucbvax.5006
fa.editor-p
utzoo!decvax!ucbvax!editor-people
Sat Nov  7 00:25:37 1981
Strong typing is bad for you
>From RMS@MIT-AI Fri Nov  6 23:53:41 1981
The type checking of PASCAL is detrimental to extensibility.
Every declaration about an external function or variable
is a duplicate redundant piece of information which increases
the number of different places which must be edited in order
to make a particular change.  In some of those places, the code
may need to be changed anyway, but probably NOT in all of them.

In addition, requiring type declarations makes it hard for the
user to write a large class of generic functions including
MAPCAR and MEMBER.  MAPCAR calls a user-supplied function
over and over and makes a list of the values.  This is not
even imaginable unless the language has a list structure data
type which allows any type of data for the elements.  MEMBER
searches a list for something that matches a specified value.
The code for MEMBER can be the same no matter what type
the elements are; but a typed language would force the user to declare
that type, thus restricting any single MEMBER-like function to
working on only one data type.  MAPCAR and MEMBER are built-in in
Maclisp dialects, but the class of functions which would run
into the same problem is infinite.

Allowing overloading does not solve this problem.  I do not want
to be permitted to write a dozen definitions for MEMBER, identical
except for declarations.  I want to write only one.

If type checking and declarations are optional, then they
can be valuable.  If mandatory, as in most of the obsolete
batch languages including PASCAL and Ada, they are a screw.

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.