[plt-scheme] call-by-value vs. call-by-name?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Jan 28 10:21:11 EST 2008

On Jan 28, 2008, at 10:03 AM, Grant Rettke wrote:

> On Jan 28, 2008 7:31 AM, Matthias Felleisen <matthias at ccs.neu.edu>  
> wrote:
>>> 2) Recently, there seems to have been a great increase
>>> in focus on lazy evaluation across the functional
>>> programming landscape.
>>
>> What evidence do you have for that? I actually believe that interest
>> in laziness peaked in the late 90s and has dwindled to little.
>
> On the fringes of the professional community (blogs posting and
> articles), there has been a lot of hype about Haskell for the past
> year or two. So much so that 'functional programming' and 'lazy'
> seemingly go together like 'peanut butter and jelly'.



As Noel correctly points out, most people get interested in Haskell  
because of its complex type system, which allows you to express more  
claims about your programs in a formal, checked language. For some  
reason or other, people who like to play with toys are fascinated by  
that. They are willing to swallow Laziness because it comes with the  
territory.

Ditto for Monads. They are a generalized type language, from this  
perspective. In this world you can express certain things about the  
effects in your program  that you can express in a mostly functional  
language, aka Scheme, ML.


> If I hear one more person tell me "Well you know Haskell is a *pure*
> functional programming language unlike Scheme...", I guess I wouldn't
> be surprised.


As Carl said, "pure" means it's missing things. What it is missing is  
an honest set of imperative constructs. For that reason, it is easier  
to come up with novel extensions to the type system and implement  
them. Many of them probably wouldn't carry over to an imperative  
language in the simple form.

Since academia rewards people for working on small, tough-looking  
problems whose solution can be sketched in 10 conference-style pages,  
you can see why such purity attracts people who wish to solve type- 
theoretic problems and claim that they implemented them (or someone  
did it for them. Since Simon likes everything, sooner or later every  
type feature ends up in some Haskell).

See, there is a self-feeding cycle (positive feedback loop) and now  
you meta-know more than most bloggers on this subject.

-- Matthias

P.S. I don't know what Noel means with PLT like theorems about  
programs. PLT -- as in us -- likes theorems about programming  
languages, because it sells papers in certain circles. And it is a  
reasonable thing to do.



Posted on the users mailing list.