pfalcon / re1.5

re1, the unbloated regexp engine by Russ Cox, elaborated to be useful for real-world applications
BSD 3-Clause "New" or "Revised" License
42 stars 4 forks source link

Add named character classes to dumpcode. #8

Closed ampli closed 9 years ago

ampli commented 9 years ago

This time I used blanks for indentation, as in the rest of this file. However, I must admit I prefer the original code indentation by tabs, still used in most of the rest of the files (but some glitches.)

pfalcon commented 9 years ago

I'm very sorry about this, I didn't mean to ask you to re-do the patch, I actually did it all myself, but turns out that forgot to git push (done now).

However, I must admit I prefer the original code indentation by tabs

Well, the standard rule of thumb is "use the same codestyle as surrounding code". I keep tabs for original code and not going to change it. But for newly written code, I use spaces and sensible indentation of 4. And here's why:

(but some glitches.)

If tabs are used, there always will be some glitches, at least for someone. Spaces is the way to get it consistent for everyone.

ampli commented 9 years ago

Of course I will not argue about whether it is better to use tabs or spaces. The fact that most files use tabs just confused me... (I usually use tabs for indentation and space for alignment, and have vim definitions to support its consistency. I guess I will need to add automatic detection of space-convention files and change the vim setup to use only spaces in such a case.)

BTW, by "glitches" I meant to new changes in tab-indented files in which blanks were used instead of tabs, or to several old empty lines with tabs only, or a tab at end of line .