🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #4689

Re: Static typing with Dynamic binding

#4689
From: mouse
Date: Sun, 01 Mar 1987 06:31
33 lines
1914 bytes
In article <1075@tekchips.TEK.COM>, willc@tekchips.TEK.COM (Will Clinger) writes:
[in contribution to the current debate]
> What I believe is that dynamic scoping is incompatible with any
> reasonable form of static type checking.

> For example, here is a legal DSP program:

>     program legal(modulo, my, imperfect, remembrance, of, Pascal);
> [...]
>     function bar (n: integer): integer;
>       begin
>         bar := 49 * x
>       end;

From Doug Moen's article ("Article-I.D.: watcgl.624"), in which he
defines DSP:

> Here are the rules for "Dynamically Scoped Pascal":
[...]
> Every variable mentioned in the body of a function must be a formal
> parameter, a local variable, or a variable declared in an "imports"
> clause, which is inherited from the calling environment.

....but inside bar, x isn't a formal parameter, it isn't a local
variable, and it doesn't appear in an imports clause, so bar isn't
allowed to use x.

					der Mouse

USA: {ihnp4,decvax,akgua,utzoo,etc}!utcsri!musocs!mcgill-vision!mouse
     think!mosart!mcgill-vision!mouse
Europe: mcvax!decvax!utcsri!musocs!mcgill-vision!mouse
ARPAnet: think!mosart!mcgill-vision!mouse@harvard.harvard.edu
Technical Details
Message-ID: <668@mcgill-vision.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!ptsfa!lll-lcc!styx!ames!ucbcad!ucbvax!decvax!decwrl!pyramid!prls!philabs!micomvax!musocs!mcgill-vision!mouse
References: <364@oracle.tc.fluke.COM> <814@unc.unc.UUCP> <1040@tekchips.TEK.COM> <1075@tekchips.TEK.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!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!ptsfa!lll-lcc!styx!ames!ucbcad!ucbvax!decvax!decwrl!pyramid!prls!philabs!micomvax!musocs!mcgill-vision!mouse
From: mouse@mcgill-vision.UUCP
Newsgroups: comp.lang.misc
Subject: Re: Static typing with Dynamic binding
Message-ID: <668@mcgill-vision.UUCP>
Date: Sun, 1-Mar-87 01:31:45 EST
Article-I.D.: mcgill-v.668
Posted: Sun Mar  1 01:31:45 1987
Date-Received: Tue, 3-Mar-87 19:49:12 EST
References: <364@oracle.tc.fluke.COM> <814@unc.unc.UUCP> <1040@tekchips.TEK.COM> <1075@tekchips.TEK.COM>
Distribution: comp.lang.misc
Organization: McGill University, Montreal
Lines: 33