categories - Category Theory list
 help / color / mirror / Atom feed
From: Michael Fourman <michael.fourman@ed.ac.uk>
To: Bill Lawvere <wlawvere@buffalo.edu>, <categories@mta.ca>
Subject: Re: Re: Functions in programming
Date: Sun, 22 Mar 2009 14:22:24 +0000	[thread overview]
Message-ID: <E1LljA4-0005p8-Av@mailserv.mta.ca> (raw)

Dear Bill,

It's not primarily a matter of efficiency, but rather of expressiveness.

In a lazy language one can define an infinite list, pass it around as
a value, and access particular elements of it "on demand".

This demand-driven computation can be conceptually much cleaner than
trying to carefully plan, in advance, which values should be computed
in what order.

See, for example:

http://www.haskell.org/haskellwiki/Performance/Laziness

http://lua-users.org/wiki/HammingNumbersVariant

Best,

Michael

On 21 Mar 2009, at 16:06, Bill Lawvere wrote:

>
> Thanks for the several interesting replies.
> I think I am learning what "lazy" means, but
> there seems to be embedded in it a presupposition
> that the order in which new expressions are
> introduced in a computation is something that
> one does not carefully plan. It still seems to
> me to be possible that the developing languages
> are partly the legacy of an epoch when computational
> power was qualitatively less than now.
>
> I was especially heartened to see the lack of
> support for St. John's position "in the beginning
> was the word", especially in view of the recent
> attempts by physicists to revive that idealist
> position. Many of us have long instinctively
> believed that language should fit concepts
> and concepts should fit reality.
>
> Bill
>
>
> ************************************************************
> F. William Lawvere, Professor emeritus
> Mathematics Department, State University of New York
> 244 Mathematics Building, Buffalo, N.Y. 14260-2900 USA
> Tel. 716-645-6284
> HOMEPAGE:  http://www.acsu.buffalo.edu/~wlawvere
> ************************************************************
>
>
>



                 reply	other threads:[~2009-03-22 14:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1LljA4-0005p8-Av@mailserv.mta.ca \
    --to=michael.fourman@ed.ac.uk \
    --cc=categories@mta.ca \
    --cc=wlawvere@buffalo.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).