[comp.lang.misc] comparison: was He's not the only one at it again!

tom@nw.stl.stc.co.uk (Tom Thomson) (07/31/90)

In article <25681@cs.yale.edu> zenith-steven@cs.yale.edu (Steven Ericsson Zenith) writes:
>
>a := b	means "assign the value of b to a".
>a = b	means "a is equal to b".
>
>The use of := distinguishes assignment from equality, thus prevents
>overloading a single operator and IMHO is a much nicer solution to the
>C hack == used to ovecome the same problem.

I'm not sure what Steven is claiming here.
 
Is he claiming that ":=" vs "=" is a greater visual distinction than "=" vs
".EQ."?
  
Is he claiming that the Algol distinction is easier to parse than the Fortran 
one?
 
After all, the discussion was about what Algol brought that was new.  The
distinction between assignment and comparison certainly wasn't new, the only
new thing here is the particular concrete syntax:  so what's so great about
this particular concrete syntax?
 
Or is Steven, like most of those who claim that Algol brought new concepts
into the computer language area, just totally ignorant of what went before?
 
Tom Thomson   [tom@nw.stl.stc.co.uk

zenith-steven@cs.yale.edu (Steven Ericsson Zenith) (08/01/90)

In article <3261@stl.stc.co.uk>, tom@nw.stl.stc.co.uk (Tom Thomson) writes:
|>In article <25681@cs.yale.edu> zenith-steven@cs.yale.edu (Steven
Ericsson Zenith) writes:
|>>
|>>a := b	means "assign the value of b to a".
|>>a = b	means "a is equal to b".
|>>
|>>The use of := distinguishes assignment from equality, thus prevents
|>>overloading a single operator and IMHO is a much nicer solution to the
|>>C hack == used to ovecome the same problem.
|>
|>I'm not sure what Steven is claiming here.
|> 
|>Is he claiming that ":=" vs "=" is a greater visual distinction than "=" vs
|>".EQ."?

You are right to observe that my claim is ambiguous. I'll repeat here
what I have been saying in email, and have posted here before.

My intent was to point out that the equality symbol is widely used
with a quite distinct meaning in general (outside of Computer
Science): a = b meaning "a is equal to b" as opposed to a := b which
is untainted by any other meaning that I know of. I would argue that use of the
former to express the meaning of the latter is counter intuitive -
given the broad use of = in common usage across the world. So to
define = as assignment is rather like defining a language with the
symbol GO to mean output - it's almost there but is misleading.

My posting was terse and it wasn't meant to imply ignorance on the
part of the original posters. My apologies to them.

--                        
Steven Ericsson Zenith              *            email: zenith@cs.yale.edu
Fax: (203) 466 2768                 |            voice: (203) 432 1278
"The tower should warn the people not to believe in it." - P.D.Ouspensky
Yale University Dept of Computer Science 51 Prospect St New Haven CT 06520 USA

ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) (08/02/90)

In article <25696@cs.yale.edu>, zenith-steven@cs.yale.edu (Steven Ericsson Zenith) writes:
> My intent was to point out that the equality symbol is widely used
> with a quite distinct meaning in general (outside of Computer
> Science): a = b meaning "a is equal to b" as opposed to a := b which
> is untainted by any other meaning that I know of.

:= has been used in mathematics; pronounce it "is defined as".
(You may have seen {small Delta above equal} or {equal sub "def"}
used for the same purpose.)  This is not _too_ remote from the Algol use.

Fortran wasn't able to use := for the simple reason that 026 keypunches
had no colon (:, <, >, aren't in the BCD character set).  Burroughs had
a variant of BCD which was designed for Algol, it even had <= as a single
character.  Algol was able to use := because Algol drew a distinction
between "the publication language" (however fancy a typesetter wanted to
make it), "the reference language" (in which all keywords and operators
are construed as single characters) and the hardware language"
which is machine-dependent.  I hate to reveal this, but there is no
reason in principle why one couldn't have a hardware language for Algol 60
where := was represented by = and = was represented by .EQ. (one might
also want .BEGIN., .END., .IF., and so on).  Was Algol 68 the last
standardised language to try to maintain the distinction between how a
programming language was to be printed for human consumption and how it
may be prepared for a computer in a machine-dependent way?  (Dare I
mention Point stropping, Case stropping, and the others?)

-- 
Distinguishing between a work written in Hebrew and one written in Aramaic
when we have only a Latin version made from a Greek translation is not easy.
(D.J.Harrington, discussing pseudo-Philo)

schwartz@groucho.cs.psu.edu (Scott Schwartz) (08/02/90)

In article <3503@goanna.cs.rmit.oz.au> 
 ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:

   Was Algol 68 the last
   standardised language to try to maintain the distinction between how a
   programming language was to be printed for human consumption and how it
   may be prepared for a computer in a machine-dependent way?  

Knuth's WEB does this to some extent.  Hmmm.  Does that make your
point or refute it? :-)

ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) (08/04/90)

In article <Fe40=-c1@cs.psu.edu>, schwartz@groucho.cs.psu.edu (Scott Schwartz) writes:
> In article <3503@goanna.cs.rmit.oz.au> I wrote
>    Was Algol 68 the last
>    standardised language to try to maintain the distinction between how a
>    programming language was to be printed for human consumption and how it
>    may be prepared for a computer in a machine-dependent way?  

> Knuth's WEB does this to some extent.  Hmmm.  Does that make your
> point or refute it? :-)

It makes my point.  I've had students complain bitterly that they
"can't read this stuff, it isn't Pascal" when the change is something
as mild as (a) putting keywords in \bf and (b) using crossed-equal,
underlined-less, underlined-greater instead of <>, <=, >=.  I shudder
to think what they'd do to me if I dared to use the \in character
instead of "in".

Web actually does something rather different.  The Web programs take
a program written in the "Web" language and translate it into another
(either TeX or Pascal).  Macros, for example, are part of Web, not
part of Pascal; Web does more than provide a publication style for them.

-- 
Distinguishing between a work written in Hebrew and one written in Aramaic
when we have only a Latin version made from a Greek translation is not easy.
(D.J.Harrington, discussing pseudo-Philo)