Re: pure functions
- From: anon7843@xxxxxxxxxxx (Anonymous 7843)
- Date: Mon, 13 Jun 2005 17:48:48 GMT
In article <slrndal21b.87j.chris@xxxxxxxxxxxxxxxxxx>,
Chris Croughton <chris@xxxxxxxxxxxx> wrote:
>
>On Fri, 10 Jun 2005 21:30:57 +0000 (UTC), Malcolm
> <regniztar@xxxxxxxxxxxxxx> wrote:
>
>> For instance you could have a convention that pure functions always take
>> single-letter parameters, non-pure functions always take at least one
>> parameter with more than one letter.
>
>Or no parameters at all (a function which has no parameters can't be
>'pure' unless it is trivial and returns a constant).
There are also "short term" pure functions like time() and ftell()
which normally cannot be treated as pure by the compiler, but which
are nonetheless good candidates for manually hoisting out of tight loops
in which nothing in the loop resets the date or writes to the file.
--
7842++
.
- Follow-Ups:
- Re: pure functions
- From: Lawrence Kirby
- Re: pure functions
- From: Walter Roberson
- Re: pure functions
- References:
- pure functions
- From: junky_fellow
- Re: pure functions
- From: Keith Thompson
- Re: pure functions
- From: Malcolm
- Re: pure functions
- From: Chris Croughton
- pure functions
- Prev by Date: Re: how to define the array of strings
- Next by Date: Is Both Statement Are Same
- Previous by thread: Re: pure functions
- Next by thread: Re: pure functions
- Index(es):
Relevant Pages
|
|