[comp.sys.ibm.pc] pretty program for C

hardin@hpindda.HP.COM (John Hardin) (09/23/88)

>Although a 'pretty' program like UNIX 'indent' may be very useful,
>being in a professional programming environment has taught me one very
>important thing - make the format of your programming so automatic
>that you don't need a code formatter.  Many years of experience of many
>software engineers here have proven this to be true.  If you have to
>use a 'pretty' program, it has the possibility of screwing up your
>intentions in some places instead of cleaning up your style.  Also, using
>a 'pretty' program tends to let you get sloppy in your style and this
>will carry over into your coding practices.
>
>	Dion Hollenbeck   
>----------

I heartily agree, but that doesn't mean you don't occasionally need
a "pretty" program to fix up someone elses code to make it more 
readable.  I've found that everyone seems to have a different idea
about what consititutes "pretty" code.  I suspect that some of these
differences may be unresolvable because they come from brain physiology
(e.g., left-brain/right-brain dominance, etc.).  Might be nice if there
were a customizable pretty-print program that would allow each of use
to deal with code in a format suited to our individual needs.  This might
require a standard code file storage format that could be easily 
understood by everyone's personal pretty printer. 

Dream on...

      John Hardin   hardin%hpindda@hplabs.hp.com
_________

mcdonald@uxe.cso.uiuc.edu (09/27/88)

>The version we have is Copyright 1976 by Univ of Illinois, so I'm not
>sure it's the same one, and Berkeley doesn't have rights to it. Three of
>us have added features and documentation over the last seven years, and
>it would be nice to be able to share it.
Is that the one that rearranges


a=+5;   to a += 5;

and

afloat=.5;    to  afloat .= 5;

by any chance?

I'll call up the Chancellor's office and demand they make the little
bugger (ouch!) public domain.

davidsen@steinmetz.ge.com (William E. Davidsen Jr) (09/30/88)

In article <45900157@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes:

| Is that the one that rearranges
| 
| 
| a=+5;   to a += 5;
| 
| and
| 
| afloat=.5;    to  afloat .= 5;
| 
| by any chance?

No, but almost as bad...
	a=+5 becomes a =+ 5, which compiles on our system. 

  I think theres an option to do what you ask, but I can't find the
docs handy and I set my default options file *years* ago... I expect to
be able to post the "enhanced" version of this as soon as I change one
more thing. I've been putting it off for about two years now, so this
will be the push which gets it done.

-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me