[Swift-devel] printing and library functions

Michael Wilde wilde at mcs.anl.gov
Wed Mar 25 07:24:09 CDT 2009



On 3/25/09 7:13 AM, Ben Clifford wrote:
> the need for better progress monitoring of a run doesn't necessarily 
> correspond with a need for more output primitives in the language.

I think at most we need a plain print, like trace but unadorned.
And we can certainly live with just trace (as primitives).

> there are lots of other possibilities. For example (not that I 
> particularly like it, but its a radical departure from seq/printf so 
> illustrates my point), imagine your source code appearing in a window with 
> every for loop and dataset declaration annoted (in colour or text) by its 
> state/progress.

Yes, that would be very cool.

Another simpler step is that progress monitoring shows a top-like 
running tally by procedure of how many have executed, how many are 
pending, how many are yet un-entered, what each proc's total and average 
run time was, etc.  We can give a lot more useful information in place 
simple text.

This would eliminate the need for much printf'ing, leaving only 
application specific status to print (eg: in my convergence loop, 
printing the current vs target value each time around the iterate).





More information about the Swift-devel mailing list