Re: What is an Effect?

2011-01-02 Thread Jesse Phillips
Manfred_Nowak Wrote: > docs: > | Expressions that have no effect, like (x + x), are illegal in > | expression statements. > > But what sorts of effects are meant with this? (x + x) performs a calculation and throws out the result. x = 42; x = 42; This is performing an assignment of the same v

What is an Effect?

2011-01-02 Thread Manfred_Nowak
docs: | Expressions that have no effect, like (x + x), are illegal in | expression statements. But what sorts of effects are meant with this? In phobos the expressionStatement `cmp("foo", "bar");' is used in unittest.d. A comment says: | Bring in unit test for module by referencing function in