Pure functions in D
Sergey Gromov
snake.scaly at gmail.com
Mon Sep 29 14:58:04 PDT 2008
Mon, 29 Sep 2008 18:38:19 -0300,
bearophile escribio:
> Regarding the pure function topic: is it possible to have, just at
> debug time, the possibility to add special debugging printing
> statements into pure functions? :-)
I think you can pretend that a debug trace is pure if it can't fail and
is internally synchronized. Also see below.
Ary Borenszweig wrote:
> Can't a debugger enter pure functions?
Can a debugger enter a new thread? I think not unless you've set a
breakpoint there. Though I think in debug mode (no -O option) pure
functions should be executed sequentially and in a single thread so that
they can be traditionally debugged. This also solves the out-of-order
tracing problem.
More information about the Digitalmars-d
mailing list