[Issue 4974] Cannot have pure constructor due to impure invariant

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 9 04:46:57 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4974



--- Comment #7 from bearophile_hugs at eml.cc 2010-11-09 04:45:54 PST ---
(In reply to comment #5)

> You should be able to do printf-style debugging in ANY pure function.

Another simple solution is to add a special pure printf version, that's just a
pure alias of printf:


pure void foo() {
    pureprintf("foo");
}


pureprintf() is not meant for normal output, but just for debugging and the
like. And the person that uses pureprintf() has to remember that it's not
deterministic, its output may appear or not appear.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list