scsh-users
[Top] [All Lists]

Re: Strings as a uniform representation & tcl

To: scsh@martigny.ai.mit.edu
Subject: Re: Strings as a uniform representation & tcl
From: clin@cs.umd.edu (Charles Lin)
Date: 17 Apr 1997 16:04:25 GMT
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Olin Shivers (shivers@lambda.ai.mit.edu) wrote:
||     >     If one had to choose a single type for everything, a string is a
||     > pretty good choice.   Why not a number?  How would you represent a
||     > string with a number?

|| Perlis, as usual, summed it up well in one of his aphorisms:

||     The string is a stark data structure, and everywhere it
||     occurs there is much hiding of information.

|| This is what is wrong with both Unix and tcl. Their power is also a great
|| weakness: they are designed around a "least common denominator"
|| representation, strings. What it buys you is that everything interoperates.
|| The above aphorism explains what it costs you.

    Notice this is why I said "if one HAD to" choose a single data type,
a string would probably be it.    I didn't argue that it was a good idea.
In other words, given that you had to choose one type that a language
had to be in, what would you choose?   The problem with lists is that
a list is really a compound data structure.   For example, in a Lisp
list (a (b c)), what is "a", "b", and "c"?   Lists are built from 
basic elements.   Yes, yes, you can build up some sort of counting by
using the empty list and list of empty lists, and so on, but again,
ease of programming counts.

    My preference is to have multiple types.

--
Charles Lin
clin@cs.umd.edu


<Prev in Thread] Current Thread [Next in Thread>