Deutsch English Français Italiano |
<vmh064$sv1$1@gal.iecc.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail From: John Levine <johnl@taugh.com> Newsgroups: comp.arch Subject: Re: Stacks, was Segments Date: Sat, 18 Jan 2025 19:41:56 -0000 (UTC) Organization: Taughannock Networks Message-ID: <vmh064$sv1$1@gal.iecc.com> References: <vdlgl9$3kq50$2@dont-email.me> <04876fc002ab019a74c78113a36622f3@www.novabbs.org> <vmf5vv$2cse$1@gal.iecc.com> <lv18qpFjhe9U1@mid.individual.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 18 Jan 2025 19:41:56 -0000 (UTC) Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="29665"; mail-complaints-to="abuse@iecc.com" In-Reply-To: <vdlgl9$3kq50$2@dont-email.me> <04876fc002ab019a74c78113a36622f3@www.novabbs.org> <vmf5vv$2cse$1@gal.iecc.com> <lv18qpFjhe9U1@mid.individual.net> Cleverness: some X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: johnl@iecc.com (John Levine) Bytes: 2509 Lines: 30 According to Niklas Holsti <niklas.holsti@tidorum.invalid>: >>> Algol 60 only had stack allocation for dynamically sized arrays, >>> so stacks had to be as big as the data are. >> >> Huh? Algol 60 routines could be mutually recursive so unless it was >> a leaf procedure or the outer block, everything not declared "own" >> went on the stack. > >Mitch's point AIUI was that Algol 60 had no heap allocation (and no >explicit pointer types), so indeed all data were either on the stack or >statically allocated. It sounded to me like he said that dynamically sized arrays were on the stack, nothing else was. I think we agree that everything but "own" is on the stack. Algol 60 did need a heap because own arrays could have variable size. That wasn't an accident since sec 5.2.2 shows an example of a variable size own array. I suspect they didn't realize the implications both of resizing non-stack data, and what happens in an upper level call if a lower level call resizes the array underneath it. It wasn't the only mistake like that. Alan Perlis told me that they intended call by name to be an elegantly phrased definition of call by reference, and it wasn't until Jensen's device that they realized what they had actually done. -- Regards, John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies", Please consider the environment before reading this e-mail. https://jl.ly