🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3047

Re: Dynamic typing (part 3)

#3047
From: David Gudeman
Date: Tue, 19 Mar 1991 08:08
30 lines
1487 bytes
In article  <L-2A3G2@xds13.ferranti.com> Peter da Silva writes:

]But if you don't know that y is complex, you don't know if "y <= 0" is
]legal or not...

If you don't know the length of A, you don't know whether "A[i]" is
legal or not.  So?  You should know the length of A and you should
know the type of y.  In someone elses code, if you see "y <= 0",
then you can assume that y is not complex.  In you own code, if you
know that y is not complex you can write "y <= 0".  There is no
ambiguity.

]with this in mathematics is everyone has had a bunch of Fortran-style'
]default typing rules programmed into their head in college.

No, the reason you can get away with this in math is that everyone who
has a clue knows that you can't compare magnitudes of complex numbers,
so if you are comparing magnitudes, the numbers must not be compex.
This is a trivial logical inference:

(1) y is complex implies "y <= 0" is not meaningful
(2) "y <= 0" is meaningful
therefore
(3) y is not complex

There is nothing sloppy or ambiguous about this reasoning.
--
					David Gudeman
gudeman@cs.arizona.edu
noao!arizona!gudeman
Technical Details
Message-ID: <815@optima.cs.arizona.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!news.cs.indiana.edu!arizona.edu!arizona!gudeman

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!news.cs.indiana.edu!arizona.edu!arizona!gudeman
From: gudeman@cs.arizona.edu (David Gudeman)
Newsgroups: comp.lang.misc
Subject: Re: Dynamic typing (part 3)
Message-ID: <815@optima.cs.arizona.edu>
Date: 19 Mar 91 08:08:09 GMT
Sender: news@cs.arizona.edu
Lines: 30