Comments (6)
You have to do it manually then. Which includes much more work to keep it up to date. Thats why every styleguide for other languages recommends not to align commands.
But using chaining enables the AUTO-Align feature of the ABAP-Editor.
from styleguides.
I think this section should also be reconsidered due to the fact that the up-front chaining will also be applied by ADT when using the quick assist functionality for not declared variables.
from styleguides.
The main reason imho is the refactoring issue: it requires a lot more changes to cut&paste chained variables for refactoring than one-line-data-definitions. The most trouble you have when the you need to cut out the first or the last definition in a chained declaration.
from styleguides.
I agree. I am just thinking, that you lose more than you gain:
You gain the benefit of copying a complete line when refactoring manually.
But you lose any alignment, in the data sections, which usually helps me a lot to quickly see the data types of the variables.
from styleguides.
Not using colons and aligning does not exclude each other... ;)
from styleguides.
I don't understand why there should be a Clean Code rule for chaining DATA declarations or not.
The reason is, I don't read the declarations, I read the rest of the code. Clicking F2 gives me information on the variables I need to see, and I just need to see one declaration at a time. I don't bother how the DATA lines are aligned, chained or not.
My personal opinion is that this DATA block is often short because the procedure has to be short and inline variables are to be preferred, and so it doesn't harm my eyes a lot if the variable typing is not aligned. But generally speaking, my eyes really prefer to see them aligned (automatically of course, via the pretty printer). Moreover, the ADT Quick Assists converts inline variables into local variables or attributes by chaining them, so I don't want to spend time to "unchain" them!
So, I would love a lot that this section is removed. Same thing for the section "Don't align type clauses". Or the only thing worth saying is "do NOT spend time in aligning manually" and "do NOT spend time in removing the alignment manually". Even a mix of chained and "unchained" DATA doesn't bother me.
from styleguides.
Related Issues (20)
- Accessing TYPES through instance variables HOT 3
- Inconsistency: Align or don't align type clauses? HOT 1
- Returning a value HOT 7
- Using `FIELDS` in SQL-Statements HOT 5
- [Comment Position] what is wrong with inline comments? HOT 12
- Strategy regarding translations HOT 2
- Strategy for handling dependencies to system releases HOT 4
- Text on logo not readable in dark mode (Code Review Guide) HOT 3
- [Exploit the test tools] Add CL_AUNIT_AUTHORITY_CHECK to the list? HOT 6
- [Consider decomposing complex conditions] bad use case example HOT 1
- German Translation: Typo HOT 1
- Use assert class instead of ASSERT HOT 12
- Are comments bad or not?
- [Use CHANGING sparingly, where suited] Is it ok to use IMPORTING REF instead of CHANGING? HOT 7
- New rule: prefer inferring types HOT 1
- Abap Exception categories HOT 3
- Use READ-ONLY sparingly - new abap command FINAL HOT 2
- How to add sample code to Clean ABAP? HOT 1
- Unclear explanation of [Use LOCAL FRIENDS to access the dependency-inverting constructor] HOT 5
- Follow rules when abbreviating HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from styleguides.