On 03/27/2018 09:19 PM, Martin Sebor wrote: > On 03/27/2018 01:38 PM, Pedro Alves wrote: >> On 03/27/2018 07:18 PM, Martin Sebor wrote: >>> +Because a @code{pure} function can have no side-effects it does not >> >> FWIW, I'd suggest rephrasing as: >> >> Because a @code{pure} function cannot have side effects >> >> because "can have no side-effects" can be read as >> "is allowed to have no side effects", which gave me pause >> when I read it the first time, and is the opposite of >> what you mean. > > That is what I meant: that const and pure functions are not allowed > to have any side-effects. If they did, they could be unexpectedly > eliminated (i.e., the behavior is undefined when such a function > does have a side-effect).
I know, but that's not what I read the first time (and found it odd so I had to re-read). You can either assume that I'm the only one that will misunderstand it on first read, or you can swap a couple words and be sure no one will misunderstand it. Up to you. > > I don't have a strong preference for one phrasing over the other > but they both say the same thing. One is just ever so slightly > more emphatic. > Thanks, Pedro Alves