Design #610
Variable It: assign before or after printing
Description
I found this is an old email (20101119).
Currently given a freestanding top-level expr C5 evaluates it,
prints the value, and then assigns it to It
. I discovered
this while trying to track a memory problem: every malloc/free
printed a logging message -- I was surprised to see so many
logging messages appear after the result was printed.
In any case I want to be sure that if printing is interrupted
then I can still rely on the assignment to It
having been
completed before the prompt reappears.
A "psychological" disadvantage to assigning to It
before
printing the result is that a simple computation could appear to
take a long time if It
previously contained a large result
which takes some time to delete.
Opinions? Am I simply creating a problem where none existed?
Related issues
History
#1 Updated by John Abbott about 4 years ago
- Description updated (diff)
- Target version changed from CoCoA-5.?.? to CoCoA-5.4.0
#2 Updated by John Abbott about 4 years ago
If we make printing interruptible then it would be better to assign to It
before printing (o/w the assignment may never occur).
#3 Updated by John Abbott about 4 years ago
- Related to Feature #1271: Allow Interruption of printing? added
#4 Updated by John Abbott over 2 years ago
- Target version changed from CoCoA-5.4.0 to CoCoA-5.4.2
Is the value "assigned" to It
or swapped into It
(hopefully without being copied more than strictly necessary)?