-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefer CORRESPONDING # to MOVE-CORRESPONDING #521
Comments
There seems to be no section in the style guide that actually recommends this. If we promise "adherence to Clean ABAP" in our documentation, we shouldn't invent new checks out of thin air. |
Doesn't this fall under Prefer functional to procedural language constructs? |
Note that target and source structure need to be of the same type for the constructor expression to have the same result as the statement, a check would have to account for this. |
From the documentation of
This means that the "functional" equivalent form of MOVE-CORRESPONDING source TO target. would be target = corresponding #( base ( target ) source ). I suspect |
Valid point, but I think off topic regarding this issue. The check is there to suggest that we should avoid Seeing variants of I also think that leaving it from the style guide example was more coincidental, there are many constructor operators, and NEW and VALUE is sufficient to indicate we should also use REF, EXACT etc., the examples are long enough as is. |
The argument that CORRESPONDING at least is explicit about whether or not the base is kept sounds convincing to me. |
instead of:
use:
The text was updated successfully, but these errors were encountered: