Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Oct 2001 12:19:41 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        j mckitrick <jcm@FreeBSD-uk.eu.org>
Cc:        David Scheidt <rufus@brain.mics.net>, Rahul Siddharthan <rsidd@physics.iisc.ernet.in>, "Gary W. Swearingen" <swear@blarg.net>, freebsd-chat@FreeBSD.ORG
Subject:   Re: code density vs readability
Message-ID:  <3BBB64CD.7B3A2C86@mindspring.com>
References:  <20011002213051.A28111@lpt.ens.fr> <Pine.BSI.4.20.0110021606080.7990-100000@brain.mics.net> <20011002214655.A1713@dogma.freebsd-uk.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
j mckitrick wrote:
> | > For programs, I like its syntax highlighting.  I don't know whether
> | > nvi has that.
> |
> | I hope not...
> 
> No offense to David.....
> 
> <rant>
> Why do some people, especially advanced programmers, hate this feature
> so much?  Isn't it great for catching misspellings before compiling, and
> for helping the eye locate a target?  It also seems good for helping the
> mind quickly understand the structure of the code.  It simply includes
> more valuable information.  I realize it can be overdone, but since you
> can configure it any way you like, why is it so bad?  Why does
> everything that makes programming easier get labeled a 'crutch' at some
> point?  I mean, LINT could be called a remedy for poor programming
> skills in the first place, but many accomplished programmers us it,
> correct?  </rant>

I think it's because we do things like this:

	main(int ac, char *av[])
	{
	}
...
	main(int ac, char *av[])
	{
		if( ac < 2) {
		}
	}
...
	main(int ac, char *av[])
	{
		if( ac < 2) {
			usage();
		}
	}
...
	main(int ac, char *av[])
	{
		if( ac < 2) {
			usage();
		}

		while( getopt("hc:f")) {
		}
	}
...


...so we never run into problems like unmatched braces.  We do
similar things for block comments.

I agree that it could be useful for catching mispellings of
keywords, but since those spellings have been wired into our
medulas (we just think of what we want, and our fingers type
the right thing for us: there's no "spelling" involved...
just like editing in "vi": we think what we want to happen,
and our finger know how to make it happen without us having
to tell them), they are extremely rare.

I guess I always have to laugh when someone used to syntax
highlighting is forced to use a standard version of an
editor because they don't have the option of compiling their
favorite editor on a platform; the poor person is well and
truly lost in their own code!  I think that's adequate
justification for calling it a "crutch": they can't walk
without it.

Per LINT: most accomplished programmers _don't_ use it.  It
is very easy to make code pass LINT: it's most useful as a
teaching tool, and the compiler these days is almost up to
doing the task entirely on its own.  Once you get the good
habits engrained, then it's not an issue after that: your
code will always pass LINT without needing modification.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BBB64CD.7B3A2C86>