Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > Re: lazyness
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 15 of 53 Topic 2718 of 3057
Post > Topic >>

Re: lazyness

by Vesa Karvonen <vesa.karvonen@[EMAIL PROTECTED] > Jan 11, 2008 at 11:16 PM

Philippa Cowderoy <flippa@[EMAIL PROTECTED]
> wrote:
[...]
> Yep. The lazy version with the same optimisation (tail call modulo a 
> slightly odd cons) will, given an arbitrary-size integer type, merely
take 
> longer than the likely life of the universe to blow the heap.
[...]

Looks like handwaving [1] to me :-).  I see no reason for why either
(Haskell)

  let omega = omega + 1 in omega

or (SML)

  let fun omega () = omega () + 1 in omega () end

would be easier to transform to tail-recursive form (neither is in
tail-recursive form) reassociating the arithmetic.  It seems to me that
both the lazy and strict versions have essentially the same
meaning(lessness).  If someone knows a paper that describes an analysis
that allows either version to be transformed to tail-recursive form, it
might be interesting to hear about it.

Anyway, I think that the insight that one should get from this is that in
a strict language, it is the construction of values that can trigger
divergence, while in a lazy language, it is the deconstruction of covalues
that can trigger divergence.  The type of the lazy omega in Haskell is [*]

  Integer

while the type of the strict omega in SML is

  unit -> int .

-Vesa Karvonen

[1] http://en.wikipedia.org/wiki/Handwaving
[2] Simplified for clarity, the type is actually Num a => a
 




 53 Posts in Topic:
lazyness
greg <mail@[EMAIL PROT  2008-01-07 04:57:43 
Re: lazyness
Ingo Menger <quetzalco  2008-01-07 05:04:56 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-11 00:25:48 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-07 13:49:41 
Re: lazyness
Philippa Cowderoy <fli  2008-01-11 00:59:09 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-13 00:16:00 
Re: lazyness
Ben Franksen <ben.fran  2008-01-14 01:49:27 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-14 01:05:51 
Re: lazyness
Ben Franksen <ben.fran  2008-01-14 03:21:48 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-14 01:31:39 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-14 15:32:55 
Re: lazyness
Ingo Menger <quetzalco  2008-01-11 06:12:24 
Re: lazyness
rossberg@[EMAIL PROTECTED  2008-01-11 07:10:05 
Re: lazyness
Philippa Cowderoy <fli  2008-01-11 20:31:12 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-11 23:16:50 
Re: lazyness
Philippa Cowderoy <fli  2008-01-12 02:47:11 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-12 11:11:17 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-14 16:40:40 
Re: lazyness
Ingo Menger <quetzalco  2008-01-12 06:37:59 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-12 23:48:49 
Re: lazyness
Philippa Cowderoy <fli  2008-01-14 03:47:43 
Re: lazyness
Joachim Durchholz <jo@  2008-01-14 12:37:10 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-14 15:29:02 
Re: lazyness
Paul Rubin <http://phr  2008-01-14 08:10:06 
Re: lazyness
Joachim Durchholz <jo@  2008-01-15 15:42:52 
Re: lazyness
Adrian Hey <ahey@[EMAI  2008-01-15 19:18:04 
Re: lazyness
Paul Rubin <http://phr  2008-01-15 11:36:21 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-15 19:30:31 
Re: lazyness
Florian Kreidler <me@[  2008-01-15 16:40:28 
Re: lazyness
Florian Weimer <fw@[EM  2008-01-14 09:10:54 
Re: lazyness
Florian Weimer <fw@[EM  2008-01-15 00:05:26 
Re: lazyness
Vesa Karvonen <vesa.ka  2008-01-14 23:58:07 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-15 05:09:25 
Re: lazyness
George Neuner <gneuner  2008-01-15 13:00:52 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-16 00:16:23 
Re: lazyness
George Neuner <gneuner  2008-01-15 21:16:16 
Re: lazyness
Jon Harrop <usenet@[EM  2008-01-16 02:49:27 
Re: lazyness
George Neuner <gneuner  2008-01-16 17:36:29 
Re: lazyness
Philippa Cowderoy <fli  2008-01-15 19:14:10 
Re: lazyness
Florian Weimer <fw@[EM  2008-01-15 23:09:56 
Re: lazyness
Joachim Durchholz <jo@  2008-01-16 00:04:57 
Re: lazyness
Paul Rubin <http://phr  2008-01-15 15:22:50 
Re: lazyness
Joachim Durchholz <jo@  2008-01-16 11:40:21 
Re: lazyness
Philippa Cowderoy <fli  2008-01-18 03:38:19 
Re: lazyness
Joachim Durchholz <jo@  2008-01-18 17:11:13 
Re: lazyness
Paul Rubin <http://phr  2008-01-18 09:01:21 
Re: lazyness
Joachim Durchholz <jo@  2008-01-18 20:23:47 
Re: lazyness
Joachim Durchholz <jo@  2008-01-19 22:23:52 
Re: lazyness
Ben Bacarisse <ben.use  2008-01-19 13:02:32 
Re: lazyness
Philippa Cowderoy <fli  2008-01-19 16:43:00 
Re: lazyness
Philippa Cowderoy <fli  2008-01-19 21:50:48 
Re: lazyness
Joachim Durchholz <jo@  2008-01-19 23:10:39 
Re: lazyness
Philippa Cowderoy <fli  2008-01-19 23:01:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Nov 19 7:43:38 CST 2008.