SAP / styleguides

This repository provides SAP style guides for coding and coding-related topics.
Other
1.68k stars 445 forks source link

Field symbols, references, loop and dynamic data accesses #307

Closed bjoern-jueliger-sap closed 1 year ago

bjoern-jueliger-sap commented 1 year ago

Years-long prior discussion and context for this in #115. This pull request is an attempt to force some sort of decision on the issue.

I think the current state of the guide (recommending to use references always but then linking to an issue within the guide itself saying the section is being challenged) is inacceptable. If we cannot find consensus on what to recommend for field symbols, perhaps the section should be stricken entirely.

Due to changes in the ABAP language since this section was written, it seems prudent to split it up into a discussion of field symbols for dynamic data access and a discussion of field symbols as loop targets. The loop target discussion is an attempt at synthesizing the main arguments from #115 into some sort of consistent recommendation(s).

If we cannot establish agreement on the issue of loop targets or if we generally don't want a section in the guide that presents two different but consistent styles, I would propose removing the section entirely and just keeping the new section on dynamic data access. This would still be an improvement over the current state.

Closes #115.

N2oB6n-SAP commented 1 year ago

In some parallel universe there might be another irrefutable benefit to using field symbols besides the likely negligible performance gain. The immutability aspect, however, has been covered by LOOP ... INTO FINAL(line) already. Tough luck 😄

sautermi0 commented 1 year ago

5 Approvals and the author is a member of the decision board as well --> 6 required approvals reached