Jeroen Dirks Wrote: > Does anyone know the answer to this D related question on SO? > > http://stackoverflow.com/questions/1008803/how-to-use-pure-in-d-2-0/
addMsg is not marked pure and pure functions can't call impure functions... I'm not sure if addMsg can be marked pure or not. It does not touch global state but does have side effects. The key is if side effects to on the containing object or not. (I haven't used pure enough to know. Many functions in Phobos are not marked as pure even though they could be. That limits pure's use for me)
