PL/I has procedure parameters but not call by name. Algol 60 has call by name 
but not call by reference.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List <ASSEMBLER-LIST@listserv.uga.edu> on behalf 
of Paul Gilmartin <00000014e0e4a59b-dmarc-requ...@listserv.uga.edu>
Sent: Thursday, February 8, 2018 12:21 PM
To: ASSEMBLER-LIST@listserv.uga.edu
Subject: Re: Man or boy test (was: Fair comparison C vs HLASM)

On 2018-02-08, at 08:33:37, Bernd Oppolzer wrote:

> Am 08.02.2018 um 15:50 schrieb Martin Ward:
>>
>>
>> http://secure-web.cisco.com/1BYQst4tMUhn0OQV9yNTQIFppybJ0w91dgsHZtHRZ5OFG6Jn7aOxSsU9PWIni4HyW0_5nVh8ZG20CX03I9-CEemCEbfFfvX2hj94e9K4OMYtvDf_f10ZgJrOMgpJ47JzGzwUie1fk2lT0JfNN-vLwXwOD257QnOeUAdmdaseSBIixhOXR4hToYn3d2AmQEfStBhSzKukmFQI0tys2gU9ZNYnl5NQAeCGPVja-FALuxbVms22hjzw3weIpjyN4iS_D7qbDDRxUUWUkUYCawxU5GVQrAXQ2VGCQkqPkZQYc18DyNXRwjBX1Oxp98pyV-uco8V1CPXxOc1COft5oePt9ZPN_vRhNS4d3RUSZAflwS78yJ2I_-u6rH_g_VX0rHENZQ1S7r6hY7caV5wJBZxnr0A/http%3A%2F%2Frosettacode.org%2Fwiki%2FMan_or_boy_test
>>
> I would like to thank you very much for posting this.
> I never heard about this test before, but I am very fascinated by it,
> and I will try it out in the next days on my New Stanford Pascal compiler,
> as soon as I have time to do it (there is a Pascal version of the test
> on the page you mentioned above).
>
I glanced very briefly at it.  It depends on nested procedure declarations
which C lacks (and call-by-name? which Pascal lacks).  PL/I?

I think nested procedures were an early manifestation of OO-think:
a block is an object and procedures within it are methods.

Languages such as C eschew nested procedures partly because a procedure
descriptor must consist of two pointers rather than just one.  I vaguely
remember one compiler (but I think it was C) that did this with an extra
indirection: a procedure reference actually pointed to a structure
containing two pointers, one for the entry point and the other for the
stack frame.  Broke a lot of things, especially expectation of portability.

-- gil

Reply via email to