|
|
Dave Jordan wrote:
Albrecht wrote:
I took only a very quick glance at
the source code: looks like you are using tab width 3 (is
that correct?) and I see very strange code formatting ...
can you be more specific about the strange formatting?
1. A tabstop of 3 is very odd.
2. Even with the tabstop of 3 the code is a bit unusual.
Configuring the editor to fold tabs into spaces is best, so that
the code reads easily
in any editor, and in diffs/patches/lp/more/etc, and avoids
weird whitespace diffs when
making changes. Prevents someone reading the code from having to
guess your tabstop.
Here's how the code looks in a default editor, more(1), printed
to paper/converted to PDF,
etc. Hard to read, and I think few would guess a tabstop of 3:
When the right tabstop of 3 is used, I'd agree with Albrecht,
the code is still oddly formatted.
While it's good that effort was made to keep all the comments
flush right and aligned,
having conditional code /also/ be indented far out to that
comment column is confusing
to the reader, making it hard to parse the code flow, causing
the eye to have to zig-zag
across the page to see if code or comments or both are in the
far right column:
In other words, it isn't expected code would be separated with
so much horizontal white space.
Even with syntax highlighting it's a bit of an effort to follow
the code flow.
This would be clearer to the reader and more standard:
The reader expects the code to be indented flush left in a
"stair-step" pattern
as per the code flow, and only comments indented far out to the
right.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/afc128f1-271c-b592-2837-5be80ca1fefe%40seriss.com.
[ Direct Link to Message ] | |
|
| |