Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!lfcs!nick From: nick@lfcs.ed.ac.uk (Nick Rothwell) Newsgroups: comp.misc Subject: Re: 'File' name scopes (was programming styles, productivity, etc...) Message-ID: <1315@castle.ed.ac.uk> Date: 6 Dec 89 11:38:55 GMT References: <1989Dec5.104848.12081@gdt.bath.ac.uk> Reply-To: nick@lfcs.ed.ac.uk (Nick Rothwell) Organization: LFCS Enya Admiration Society Lines: 26 In-reply-to: exspes@gdr.bath.ac.uk (P E Smee) In article <1989Dec5.104848.12081@gdt.bath.ac.uk>, exspes@gdr (P E Smee) writes: > >Charlie Martin asks: >> (Does anyone know of any other languages than C -- other than C++ etc -- >> that have this file scope mechanism?) > >(Sorry about that, another 'unreplyable'.) PL/1 offers an >approximately equivalent mechanism for creating variables and >subroutines/functions which are freely shareable by a limited number of >your functions without having to be made globally accessible. Do you mean this kind of thing? (Standard ML): local type myType = ... val x: myType = ... fun fred(...) = ... and jim(...) = ... in fun joe(...) = ...fred ... jim ... x ... myType ... fun jack(...) = ...fred ... jim ... x ... myType ... end Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh. nick@lfcs.ed.ac.uk !mcvax!ukc!lfcs!nick ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ "You're gonna jump!?" "No, Al. I'm gonna FLY!"