Re: pitching names for the attribute for a function with no memory or side effects
Paul Johnson, at 01:03 +0200 on Sun, 1 Apr 2001, wrote: Without commenting on main theme of this thread, although I have plenty of opinions on that too, and not wanting to open too many cans of worms, may I simply mention that I hope we are not trying to cater too much to the average programmer? There are already plenty of languages that will do that. I'll accept this. By using a correct term, although it may be unknown to the average programmer, the programmer is presented with an oportunity to learn, and may even be exposed to a completely new programming paradigm. This is true, if "pure" can be "correctly" applied to the notion of "nosideeffects" in the context of standard Perl programming. While the term "pure", surely can be deemed "correct" in the context of functional programming, it cannot in standard Perl programming. This is not to say one can't do functional programming in Perl, or anything of the like. However, considering context in which most Perl is written, "pure" has no meaning, and hence I wouldn't consider it "correct". -- Frank Tobin http://www.uiuc.edu/~ftobin/
Re: pitching names for the attribute for a function with no memory or side effects
John BEPPU, at 12:50 -0700 on Sat, 31 Mar 2001, wrote: > I like pure too, but I'm afraid the nuance of it will be > completely lost on non-Functional programmers. not to worry... If anything, it might educate them. I didn't really grok functional programming before I got to experiment w/ some functional idioms in a perl context. I also like "pure" for its great potential in perl poetry. ;-) "not to worry"??? I don't think this attitude is useful for deciding how to name thing. You don't decide things merely on the idea of "how things should be"; you have to grasp what the average programmers is going to think of it. Just because one programming paradigm happens to name it "pure" doesn't mean that name should be carried over to other paradigms. In a functional-programming context, sure, "pure" might be a good name. But in a non-functional context, the name has little meaning with regards to the concept of "nosideeffects". -- Frank Tobin http://www.uiuc.edu/~ftobin/
RE: pitching names for the attribute for a function with no memory or side effects
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 necessarily have to. > If I *tell* it it's safe, that should be the end of the story. > It don't get much more optimal than that. I think he's talking about the 90% of the time that no one explicitly declares it, but the optimizer infers that it is "contained" anyway. Speaking of which... how about: "immutable" immutable adj : not subject or susceptible to change or variation in form or quality or nature; "the view of that time was that all species were immutable, created by God" [syn: changeless] [ant: mutable] --Source: WordNet ® 1.6, © 1997 Princeton University
Re: pitching names for the attribute for a function with no memory or side effects
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 the story. It don't get much more optimal than that. -- John Porter
Re: pitching names for the attribute for a function with no memory or side effects
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 > > :nosideeffects :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... Dan --"it's like this"--- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk
pitching names for the attribute for a function with no memory or side effects
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