Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!shelby!neon!pescadero.Stanford.EDU!philip From: philip@pescadero.Stanford.EDU (Philip Machanick) Newsgroups: comp.lang.misc Subject: Re: Algol, and language design Message-ID: <1990Jul26.171822.7193@Neon.Stanford.EDU> Date: 26 Jul 90 17:18:22 GMT References: <2406@l.cc.purdue.edu> <25630@cs.yale.edu> <58091@lanl.gov> <1990Jul26.024449.1777@esegue.segue.boston.ma.us> Sender: news@Neon.Stanford.EDU (USENET News System) Reply-To: philip@pescadero.stanford.edu Organization: Computer Science Department, Stanford University Lines: 21 In article <2406@l.cc.purdue.edu>, cik@l.cc.purdue.edu (Herman Rubin) writes: > In article <1990Jul26.024449.1777@esegue.segue.boston.ma.us>, johnl@esegue.segue.boston.ma.us (John R. Levine) writes: > > How about nested scopes and recursion? I find them handy from time to time. > > Nested scopes of DO loops are present in Fortran. Mathematicians have used > recursion for ages, and the problems with implementing recursion in the > architecture of the time were horrendous. Frankly, some of them still are. > What language allows carrying globals in registers across recursion? "Nested scopes" refers to the ability to define local names within one compilation unit. DO loops do not introduce "scope". Recursion is a problem if an architecture doesn't have a built in stack - not an issue on modern architectures. Why? Because language design required an efficient stack. Other more esoteric mechanisms like hardware displays to access non-local variables haven't paid off as much, and so are not in common use. "globals in registers across recursion"? How many _compilers_ manage registers across _any_ procedure calls? (Just asking.) Philip Machanick philip@pescadero.stanford.edu