Posted by
LordOfBikes on
URL: https://forum.librecad.org/spaces-or-tabs-tp5712261p5712288.html
ravas,
I see you've started converting whole files from spaces to tabs with your latest pull request, thus I want to put my two cents in.
First, I'm a spaces (4) guy. This is what my experience taught me over the years and what I use in job and spare time coding.
Both, tabs and spaces works fine in probably all modern IDE's and editors. Indent and outdent is no problem, even with spaces. The work flow is the same.
As github uses 8 spaces for one tab, the alignment of wrapped parameter lists is shifted there, what is often used in LibreCAD code. This is a github issue and possibly a local git issue when working in a terminal that uses 8 spaces by default too. When working in the IDE or a git GUI, everything is fine when using 4 spaces per tab.
There is a vast number of discussions about this, however it remains as a matter of taste.
My position is, that even teams of 2 members can work more efficiently when they have some coding style rules.
The LibreCAD code base is already mixed up with tabs and spaces. I think it doesn't make much sense to define rules for the 2.0 code base. Maybe for the 3.0 code. A brief look showed a mixup there too, with a majority of spaces used for indentation.
Until we don't have official coding style rules, I advocate to omit these whole file conversions. They produce a bunch of diffs which hide the valuable changes and possibly bugs too. When it comes to debugging sessions where more than one commit is involved, it is hell to go through all these diffs and find the bad one.
So feel free to use tabs for your work, but please avoid excessive space to tab conversion which produces worthless diffs.
Like I said, only my two cents.
Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution