Re: is this badly written code?
Re: is this badly written code?
- Subject: Re: is this badly written code?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Tue, 15 Apr 2008 17:39:50 +0200
Note that not everybody uses monospaced fonts everywhere - this is,
after all, the 21st century. Especially considering that Xcode
allows you to specify that different elements can be different
fonts, styles, etc... For example, I've got my comments to be in a
more readable non-monospaced font, and language keywords are in a
bold font, etc... (funny how long it took for "modern" development
systems to support features that Think Pascal nearly 20 years ago)
I've even seen code where people used "ascii art fonts" for major
comment section headers. Needless to say, they are completely
illegible with a non-monospaced font.
Using spaces to line up code is generally bad (tabs are somewhat
better, but not perfect due to the whole "how many spaces per tab").
Maybe someday we'll be able to have real "word-processing style"
formatting in source code so we can use real alignment rules, real
table formatting, included image diagrams, etc... (and have semantic
features so we won't have to rely on "comment markup" like HeaderDoc).
Though we have to reinvent source code format to reach this goal, and
as we are in 2008 and sources files are plain ASCII or UTF-8 files, I
doubt we will see this kind of feature until ..... (choose your decade).
2.) Symmetry can add elegance to the visual aspect of your code, and
thus make it more pleasing to the eye, and easier to decipher. For
example, when I have a long list of includes, I often do this to
them:
#include <aaa.h>
#include <bbbbbbbbbbbb.h>
#include <cccc.h>
personnaly i prefere to sort line by size ;-)
#include <aaa.h>
#include <bbbbbb.h>
#include <cccccccccc.h>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden