Martin D Kealey wrote:
> On Mon, 16 Feb 2009, Jon Lang wrote:
>> if there's any doubt about the matter (e.g., conclusively proving or
>> disproving purity would be NP-complete or a halting problem), then
>
> Deciding whether you have a halting problem IS a halting problem... :-)

You're making the perfect the enemy of the good.

I'm not saying that it needs to decide whether or not you have a
halting problem; I'm saying that if there's any possibility that you
_might_ have one, you should stop looking.  Let's take it as a given
that things such as exceptions, threads, and co-routines make the
automated establishment of whether or not a given function is pure a
nightmare.  The easy solution for this would be to say that if a given
function makes use of exceptions, threads, or co-routines, it will not
be auto-tagged as pure.  The process of auto-tagging pure functions
would not be perfect, in that there are likely to be a number of
functions that are in fact pure but don't get auto-tagged as such; but
it could still be _good_, in the sense that a useful set of pure
functions _would_ be auto-tagged.

-- 
Jonathan "Dataweaver" Lang

Reply via email to