Re: call by name

sean@mpi-sb.mpg.de (Sean Matthews)
Tue, 13 Jun 1995 11:35:31 GMT

          From comp.compilers

Related articles
Re: call by name sean@mpi-sb.mpg.de (1995-06-13)
| List of all articles for this month |

Newsgroups: comp.compilers
From: sean@mpi-sb.mpg.de (Sean Matthews)
Keywords: design, comment
Organization: Max-Planck-Institut fuer Informatik
References: <3onb0u$7ec@news.uni-c.dk> <3qi7oi$ee5@seralph9.essex.ac.uk> <3qvr02$4p2@minerva.worldbank.org> <dbayly-0606951052440001@homebase.tiac.net> <3rclle$ni9@csnews.cs.colorado.edu>
Date: Tue, 13 Jun 1995 11:35:31 GMT
Status: RO

David Bayly <dbayly@homebase.tiac.net> wrote:
>Call by name is an extremely powerful technique that the "dumbing down" of
>computer courses has caused to be sadly negelected. What a shame.


  Call by name is a technique that is very difficult to handle
both in theory and in practice (programming with it is hard,
getting a compiler to handle it efficiently is hard). The
only advantage it has is for programmers indulging in wilful
obscurity.


It was accidently, so far as I remember, introduced into the
algol 60 specification, and we had to live with it for a while.
A bit like McCarthy accidently introduced dynamic scoping into
Lisp, and we were stuck with that, and some of the most horribly
obscure hacks and bugs in programming, for a long time.


May they both rest in peace.


Interestingly, its only in languages that are properly referentially
transparent, like functional programming languages with *properly*
implemented substition, that call-by-name makes sense; but then it
is usually called lazy evaluation rather than call-by-name.


Sean


--
Sean Matthews <sean@mpi-sb.mpg.de>
Work: Max-Planck-Institut fuer Informatik, phone: +49 681 302 5363
            Im Stadtwald, D-66123 Saarbruecken, Germany fax: +49 681 302 5401
Home: Grossherzog-Friedrich Str. 70, Saarbruecken phone: +49 681 64015
URL: http://www.mpi-sb.mpg.de/~sean/
[Indeed, Alan Perlis told me that call by name was a mistake; they intended
call by reference. -John]
--


Post a followup to this message

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