As TRACE is an important keyword statement it would be great if the people in this group would share their thoughts!

---rony


On 18.05.2024 16:57, Josep Maria Blasco wrote:
The new multitasking tracing features introduce a new form of trace output with a "<I<" prefix. The documentation for this particular form of output (rexxref 2.29.5. /*CHG* The Format of Trace Output/, pp. 84--5) says

    /*<I<* *NEW*/

        /Identifies an exit (return) from an invocation of a routine or method. 
This trace entry
        will only appear if tracing is enabled using the ::OPTIONS directive 
using TRACE A, TRACE
        R, TRACE I or TRACE L./


Now please consider:

    Call P

    ::Routine P

    Trace ?a


This produces a single line of tracing:


    <I< Routine "P" in package "D:\Dropbox\parser\test.rex".


But (obviously) there is no OPTIONS directive.


This can be either considered as an interpreter bug, or as a documentation bug.


*A) As an interpreter bug*, "<I<" tracing should be suppressed when only "Trace a" is active, but no "::OPTIONS TRACE" is in effect.


*B) As a documentation bug*, the documentation should be amended to indicate that "Trace a" does also trigger this form of tracing.


I can see reasons to defend both A and B.


*In favour of A*, I would argue that the new features introduce unwanted and uncalled for forms of tracing in contexts where the old behaviour of the Trace instruction would not produce them. I would also argue that being able to trace "<I<" but not ">I>" for a particular routine introduces an ugly assymmetry (I do understand why this assymetry does happen, but it is an assymetry anyway, and avoidable assymetries are Bad Things). On the other hand, if one uses the ::OPTIONS TRACE directive, then one gets both ">I>" and "<I<", which is very reasonable; since one was getting ">I>" before the new features were introduced, getting "<I<" now looks like a nice extension of the language, which only makes it more complete.


*In favour of B*, one could argue that the user can disable such output anyway (by inserting a "Trace Off" before every exit point, for example), and that, since she has full control over the feature, it does not make any sense to remove it.


Philosophically, the question amounts to the following: "Where does this form of "<I<" tracing belong to?". If the answer to that question is "to the caller", then we should chose A. If the answer is "to the callee", then we should chose B.


My personal impression is that A is the right choice, but I can not be completely sure. I have had some private interchanges with Rony and we can't seem to reach a complete agreement.


What do you think?


  Josep Maria

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to