require-field-qualifiers should work for temp tables - OpenEdge Development - Products Enhancements - Progress Community

 OpenEdge Development

require-field-qualifiers should work for temp tables

  • Under Review

At the moment (11.7.2) the compiler catches some cases with temp tables but not all of them.

TechSupport informed me that the intended behaviour is that this rule should not trigger at all for temp tables because there is no ambiguity for the compiler and that this will be "fixed" in a future releease.

But i suggest doing the exact opposite and enable it fully for temp tables because it is still ambiguous for the developer.
Considering all of the following statements are valid:

FIND FIRST Customer.

FOR EACH ttCustomer NO-LOCK BY Custnum:
/* Foo */

FOR EACH ttCustomer NO-LOCK BY Customer.Custnum:
/* Foo */

FOR EACH ttCustomer NO-LOCK BY ttCustomer.Custnum:
/* Foo */

One of the biggest advantages of the new strict rules is that the code becomes more readable for the developers.
Is the case of the first FOR EACH in my example, it is not obvious which table Custnum belongs to unless the developer has an in depth understanding of the ABL compiler/runtime. This can lead to confusion wich would be avoidable when forcing the full qualification.

So i strongly suggest that this rulte should fully work for temp tables, even if it is not abiguous for the compiler.
It will help developers write cleaner code and i don't see any disadvantages in this.

The strict rules should always be as strict as possible.