🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #378

Re: Can laziness sometimes be too lazy?

#378
From: Frank Silbermann
Date: Wed, 25 Jul 1990 12:24
32 lines
1838 bytes
In article <2734@bruce.cs.monash.OZ.AU> mmcg@bruce.cs.monash.OZ.AU (Mike McGaughey) writes:
>	If I had just written:
>
>	    (first 2 [])
>
>	the program would have failed;
>	if I then incorporate that program into a larger program
>	that takes the length, naively, I would expect that to fail too.

This depends on whether you view the above as illegal or undefined.
If you view it as undefined, then there is no reason you can't
have partially-defined objects.  If you say that in a correct program
all objects should be fully defined, then what about functions?
We don't expect functions to be defined over every possible argument!
What should be the value of `factorial(-5)'?
If you view it as an error, then is not the definition
of `factorial' also in error, and therefore
anly program containing it?

If you want to view `(first 2 [])' as illegal
(and therefore any program containing it as illegal),
then you must have a prgram analyizer strong enough to detect
potential problems at compile time -- so the program can be rejected.
The only computable way to avoid all potential problems
is to only accept programs which can be guarranteed
to run without problem.  Unfortunately,
no algorthm exists to guarrantee all good programs,
so we are stuck with a choice between safety and flexibility.

	Frank Silbermann	fs@rex.cs.tulane.edu
	Tulane University	New Orleans, Louisianna  USA
Technical Details
Message-ID: <3927@rex.cs.tulane.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!rex!fs
References: <3188@osc.COM> <2734@bruce.cs.monash.OZ.AU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!rex!fs
From: fs@rex.cs.tulane.edu (Frank Silbermann)
Newsgroups: comp.lang.functional
Subject: Re: Can laziness sometimes be too lazy?
Message-ID: <3927@rex.cs.tulane.edu>
Date: 25 Jul 90 12:24:54 GMT
References: <3188@osc.COM> <2734@bruce.cs.monash.OZ.AU>
Organization: Computer Science Dept., Tulane Univ., New Orleans, LA
Lines: 32