Re: Is multi-level function return possible?

glen herrmannsfeldt <gah@ugcs.caltech.edu>
Fri, 21 Mar 2014 02:50:46 +0000 (UTC)

          From comp.compilers

Related articles
[22 earlier articles]
Re: Is multi-level function return possible? anton@mips.complang.tuwien.ac.at (2014-03-16)
Re: Is multi-level function return possible? marcov@toad.stack.nl (Marco van de Voort) (2014-03-16)
Re: Is multi-level function return possible? news@cuboid.co.uk (Andy Walker) (2014-03-16)
Re: Is multi-level function return possible? yaldnif.w@blueyonder.co.uk (Bill Findlay) (2014-03-17)
Re: Is multi-level function return possible? anton@mips.complang.tuwien.ac.at (2014-03-18)
Re: Is multi-level function return possible? news@cuboid.co.uk (Andy Walker) (2014-03-21)
Re: Is multi-level function return possible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-03-21)
Re: design of PL/I, was Is multi-level function return possible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-03-21)
Re: Is multi-level function return possible? anton@mips.complang.tuwien.ac.at (2014-03-24)
Re: Is multi-level function return possible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-03-24)
Re: Is multi-level function return possible? gneuner2@comcast.net (George Neuner) (2014-03-26)
Re: Is multi-level function return possible? news@cuboid.co.uk (Andy Walker) (2014-03-26)
Re: Is multi-level function return possible? news@cuboid.co.uk (Andy Walker) (2014-03-26)
[5 later articles]
| List of all articles for this month |

From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: Fri, 21 Mar 2014 02:50:46 +0000 (UTC)
Organization: Aioe.org NNTP Server
References: 14-03-020 14-03-022 14-03-025 14-03-030 14-03-044 14-03-046 14-03-047 14-03-048 14-03-053
Keywords: history, design, comment
Posted-Date: 21 Mar 2014 00:27:34 EDT

Andy Walker <news@cuboid.co.uk> wrote:


(snip, someone wrote)


>> "Parameters have a run-time cost": So has access to non-local
>> variables.


(snip)


> Not so much an argument as a philosophy. You can ask about the
> usefulness of a feature from several viewpoints. Is it needed? Is it
> something the users want? Is it something they should want, or would
> want if only they knew about it? Is it something that would attract
> new users or new applications? Is it consonant with the rest of the
> language? Is it easy to parse and to generate code for? Is it easy
> to explain? Is it efficient? And so on. You seem to be approaching
> your question from the point of view of a compiler writer; I'm more
> interested in writing programs. Writing programs is itself a very
> personal activity depending on experience and context, so different
> people may perfectly reasonably have very different attitudes to any
> particular feature.


The first language I knew with this feature is PL/I.


As well as I understand it, the language was pretty well defined
before anyone tried writing a compiler for it. They didn't ask many
users, though attracting new users would have been important. Seems
to me they didn't ask so much what was easy to parse (among other
features, no reserved words) and, at least the way it looks, rarely
considered how hard it might be to generate code for, or generate
efficient code for.


Many languages were defined at the same time as the first compiler
was written, with that compiler defining the language.


-- glen


[PL/I was, as I understand it, defined largely by glomming together
parts of Fortran and Cobol with some bits of Algol60. They assumed it
would be possible to implement since all of the pieces were, although
there turned out to be a lot of dark corners where things that seemed
reasonable individually weren't so reasonable in combination. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.