A desperate lunge for on-topic-ness

Chris Angelico rosuav at gmail.com
Thu Oct 18 12:15:10 EDT 2012


On Fri, Oct 19, 2012 at 2:49 AM, Dan Stromberg <drsalists at gmail.com> wrote:
> In fact, I tend to do lots of "otherwise pointless" variables, because I
> want to be able to quickly and easily insert print statements/functions
> without having to  split up large commands, during debugging.

When will we next have a language with something like the REXX 'trace
i' command?

[C:\Desktop]rexxtry trace i; say 1+2*3 "equals" words(linein(word(source,3)))
    95 *-*                 Say 1 + 2 * 3 'equals'
words(linein(word(source, 3)));
       >L>                   "1"
       >L>                   "2"
       >L>                   "3"
       >O>                   "6"
       >O>                   "7"
       >L>                   "equals"
       >O>                   "7 equals"
       >V>                   "OS/2 COMMAND C:\OS2\REXXTRY.CMD"
       >L>                   "3"
       >F>                   "C:\OS2\REXXTRY.CMD"
       >F>                   "/* SAA-portable REXXTRY procedure
11/08/91  version 1.05"
       >F>                   "7"
       >O>                   "7 equals 7"
       >>>                   "7 equals 7"
    96 *-*               Trace 'Off';

Intermediate expression/statement evaluation, full details. Takes some
knowledge to comprehend (>L> means literal, >V> variable, >F> function
return value, etc), but extremely handy. Unfortunately REXX is an
aging language, as evidenced by such features as DBCS support (but no
Unicode), and functions as first-class objects support (nonexistent).
But this is a feature that I'd love to see implemented somewhere else.

Which probably means I'm going to have to write it somewhere else...

ChrisA



More information about the Python-list mailing list