Re: pitching names for the attribute for a function with no memor y or side effects

2001-03-30 Thread John Porter
Russ Allbery wrote: > gcc and the literature both use "pure"; I'd recommend that. Excellent! So I wasn't pulling it out of... thin air. :-) I like pure too, but I'm afraid the nuance of it will be completely lost on non-Functional programmers. -- John Porter Like music? Then you're gonna lov

Re: pitching names for the attribute for a function with no memor y or side effects

2001-03-30 Thread Russ Allbery
Dan Sugalski <[EMAIL PROTECTED]> writes: > Doesn't have the right ring to it, unfortunately. It's not really > immutable, it just has no side-effects. gcc and the literature both use "pure"; I'd recommend that. -- Russ Allbery ([EMAIL PROTECTED])

RE: pitching names for the attribute for a function with no memor y or side effects

2001-03-30 Thread Dan Sugalski
At 03:30 PM 3/30/2001 -0600, Garrett Goebel wrote: >From: John Porter [mailto:[EMAIL PROTECTED]] > > Dan Sugalski wrote: > > > > > > :contained. Or possibly :irrelevant, since generally > > > speaking most people won't use it and the optimizer > > > will have to infer whether it's safe to not exec

RE: pitching names for the attribute for a function with no memory or side effects

2001-03-30 Thread Garrett Goebel
From: John Porter [mailto:[EMAIL PROTECTED]] > Dan Sugalski wrote: > > > > :contained. Or possibly :irrelevant, since generally > > speaking most people won't use it and the optimizer > > will have to infer whether it's safe to not execute > > the function every time... > > It shouldn't necessar

Re: pitching names for the attribute for a function with no memory or side effects

2001-03-30 Thread John Porter
Dan Sugalski wrote: > :contained. Or possibly :irrelevant, since generally speaking most people > won't use it and the optimizer will have to infer whether it's safe to not > execute the function every time... It shouldn't necessarily have to. If I *tell* it it's safe, that should be the end of

Re: pitching names for the attribute for a function with no memory or side effects

2001-03-30 Thread Dan Sugalski
At 08:17 PM 3/30/2001 +, David L. Nicol wrote: >James Mastros wrote: > > > Ahh, bingo. That's what a number of people (inculding me) are > suggesting -- > > a :functional / :pure / :stateless / :somthingelseIdontrecall attribute > > attachable to a sub. > > :memoizable > > :clean > > :nos

Re: What can we optimize (was Re: Schwartzian transforms)

2001-03-30 Thread David L. Nicol
Dan Sugalski wrote: > > At 02:52 PM 3/29/2001 -0800, Russ Allbery wrote: > >James Mastros <[EMAIL PROTECTED]> writes: > > > > > Ahh, bingo. That's what a number of people (inculding me) are > > > suggesting -- a :functional / :pure / :stateless / > > > :somthingelseIdontrecall attribute attachab

pitching names for the attribute for a function with no memory or side effects

2001-03-30 Thread David L. Nicol
James Mastros wrote: > Ahh, bingo. That's what a number of people (inculding me) are suggesting -- > a :functional / :pure / :stateless / :somthingelseIdontrecall attribute > attachable to a sub. :memoizable :clean :nosideeffects

Re: Schwartzian Transform

2001-03-30 Thread Simon Cozens
On Mon, Mar 26, 2001 at 04:34:22PM -0600, Jarkko Hietaniemi wrote: > > Of course. So how is the ST justified when you simply want to > > sort by length? I.e., why is this not sufficient: > > Those of the School of Maniacal Optimization may prefer calling > length() only O(N) times, instead of O