-
Notifications
You must be signed in to change notification settings - Fork 284
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
Clean code: should we replace macros with methods, and why? #844
Comments
plus the linter and transpiler doesnt work very well with macros, and I'm too lazy to fix it the linter and transpiler I see as a prerequisite for unit testing, unit testing is a prerequisite for keeping abap2xls stable and adding more features |
I'm not the devil's advocate, just to say, here's an example of "exceptional case" (c.f. macro guidelines), which is about avoiding a huge number of lines, in standard method
the 4 macros are:
|
yea this is which we cant use in 702 syntax on long term I propose to develop abap2xlsx in 740 syntax, and then automatically downport it to 702, a prerequsite for this is using abaplint, which requires the macros to be refactored. After refactoring the macros, we can use the upport rules in abaplint to upport it to 740. But again, this is long term |
Another point which makes a macro more easy than a method is |
Reopened, then closed again after double-checking they're all gone, sorry for the noise. |
Is it a problem to reopen when needed? (and keep "fix" as text of a PR if it's a fix) |
It's more of an inconvenience than a real problem, especially with long-running cleanups like the DDIC, since we can always reopen as needed. More to the point, "fix" gives the idea that that specific commit actually solves the issue, whereas "WIP" clearly marks this as a partial solution toward the goal. |
Okay, fine, I'll keep it in mind. Agreed for "WIP". Another solution is to always have a dedicated issue/enhancement per PR, even if its goal is to facilitate the fix of another issue. This way, "fix" can be kept. For instance, enhancement #524 is difficult to do without first refactoring |
Yup, I agree that having a dedicated intermediate issue as stepping stone, where possible, is a good idea. |
Recently, there was some little refactoring in a few abap2xlsx programs or classes, to replace macros (
DEFINE
...END-OF-DEFINITION
) with methods:My question:
Thanks!
This issue can be used as support to collect future modifications. These are the macros left in abap2xlsx:
The text was updated successfully, but these errors were encountered: