Re: Unintended polymorphism in Algol 60 (Gordon V. Cormack)
Tue, 27 Jun 1995 15:02:33 GMT

          From comp.compilers

Related articles
Unintended polymorphism in Algol 60 (John Cowan) (1995-06-23)
Re: Unintended polymorphism in Algol 60 (1995-06-27)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Gordon V. Cormack)
Keywords: algol60, polymorphism
Organization: University of Waterloo
References: 95-06-037
Date: Tue, 27 Jun 1995 15:02:33 GMT
Status: RO

John Cowan <> wrote:
>1) Some Algol 60 procedures seem to be polymorphic. Consider:
> 'procedure' foo(a, b, c) 'begin'
> a := b + c
> 'end';

I think that a,b,c are implicitly typed but I'm not sure.
>2) A parameter of type procedure in Algol 60 doesn't have any type or
>calling-convention information about the parameters. How does one know
>whether to supply thunks or values, and what type of values? Since there
>are no variables of procedure type, thank Ghu, a complete flow trace is
>possible, but is this really necessary?

This is a well-known screwup from FORTRAN, repeated in Algol 60, corrected in
Algol 68, but repeated again in Algol W, Pascal, and C. Pascal and C have
since been fixed. It requires a run-time type check.
Gordon V. Cormack CS Dept, University of Waterloo, Canada N2L 3G1

Post a followup to this message

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