chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] DBI


From: Peter Bex
Subject: Re: [Chicken-users] DBI
Date: Thu, 28 Feb 2008 16:30:21 +0100
User-agent: Mutt/1.4.2.3i

On Thu, Feb 28, 2008 at 10:05:58AM -0500, Graham Fawcett wrote:
> >  Why the thunk? (why not directly the port?)
> 
> Laziness: it avoids the overhead of setting up the input port if it's
> not required. You might want to iterate over a set of (id, name, blob)
> records and only open the blob if the name meets some criteria that
> are local to the app (i.e. can't be expressed in a WHERE clause).

You can make a 'smart' custom port that only really opens the blob when
you first read from it (it has to be a custom port anyway, so this is
not too much extra work).  This makes for a more convenient API, IMHO.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: pgpgTZtYQEAOm.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]